Title: Robots txt code automatically added
Last modified: February 27, 2025

---

# Robots txt code automatically added

 *  Resolved [vikashraghav096](https://wordpress.org/support/users/vikashraghav096/)
 * (@vikashraghav096)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/robots-txt-code-automatically-added/)
 * Dear WP Optimize Support Team,
 * I am experiencing an issue after installing and activating the WP Optimize plugin
   on my WordPress website. I have noticed that extra code is being added to my 
   robots.txt file automatically. Specifically, the following rule appears:
 * `User-agent: * Disallow: /wp-content/uploads/wpo/wpo-plugins-tables-list.json`
 * This addition is unexpected and is not coming from any physical robots.txt file
   or other plugins. I require full control over my robots.txt file and would prefer
   not to have any unwanted rules injected automatically.
 * Could you please assist me in resolving this issue or provide guidance on how
   to disable this behavior?
 * Thank you for your support.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Frobots-txt-code-automatically-added%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Support [Damilare](https://wordpress.org/support/users/deabiodun/)
 * (@deabiodun)
 * [1 year, 3 months ago](https://wordpress.org/support/topic/robots-txt-code-automatically-added/#post-18334099)
 * Hi!
 * That rule was added for security purposes, as it basically instructs search engine
   crawlers to avoid accessing or indexing the wpo-plugins-tables-list.json file.
 * You can automatically prevent that entry by applying the following code:
   `function
   remove_wpo_plugins_tables_list_json($output) {  // Define the line to remove  
   $upload_dir = wp_upload_dir();  $path = wp_parse_url($upload_dir['baseurl']);
   $line_to_remove = "User-agent: *\nDisallow: " . str_replace($path['scheme'].'://'.
   $path['host'], '', $upload_dir['baseurl']) . "/wpo/wpo-plugins-tables-list.json";//
   Remove the specific line from the output  $output = str_replace("\n" . $line_to_remove,'',
   $output); return $output; } add_filter('robots_txt', 'remove_wpo_plugins_tables_list_json',
   100, 1);
 * Place the code in your theme’s functions .php file or preferably in a code snippet.
   
   Feel free to get in touch if you need further assistance.
 * Regards,
   Damilare.

Viewing 1 replies (of 1 total)

The topic ‘Robots txt code automatically added’ is closed to new replies.

 * ![](https://ps.w.org/wp-optimize/assets/icon-256x256.png?rev=1552899)
 * [WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance](https://wordpress.org/plugins/wp-optimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-optimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-optimize/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-optimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-optimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-optimize/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Damilare](https://wordpress.org/support/users/deabiodun/)
 * Last activity: [1 year, 3 months ago](https://wordpress.org/support/topic/robots-txt-code-automatically-added/#post-18334099)
 * Status: resolved