Title: Block bots in Uploads
Last modified: March 30, 2022

---

# Block bots in Uploads

 *  [amagab](https://wordpress.org/support/users/amagab/)
 * (@amagab)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/block-bots-in-uploads/)
 * Is there a method or plugin that can help us block bots from crawling certain
   PDFs in our Uploads directory? We are using the native Media manager because 
   it’s easy for one our users. I understand we can block a specific directory and
   upload into that directory, but that makes it harder for this particular non-
   techy user. Any suggestions?

Viewing 1 replies (of 1 total)

 *  [Liew Cheon-Fong](https://wordpress.org/support/users/lcf/)
 * (@lcf)
 * [4 years, 1 month ago](https://wordpress.org/support/topic/block-bots-in-uploads/#post-15510560)
 * try the following code in robots.txt file:
 *     ```
       User-agent: *
       Disallow: /wp-admin/
       Allow: /wp-admin/admin-ajax.php
       Disallow: /wp-content/uploads/
       ```
   
 * *Some bots may not obey robots.txt rules…
 * You may also want to disallow directory browsing for upload folder.
    1. create
   and edit a .htaccess file in /wp-content/uploads/ with the following line of 
   code:
 *     ```
       Options -Indexes
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Block bots in Uploads’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Liew Cheon-Fong](https://wordpress.org/support/users/lcf/)
 * Last activity: [4 years, 1 month ago](https://wordpress.org/support/topic/block-bots-in-uploads/#post-15510560)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
