I remove robots.txt file in my server root but google can't delete that. Webmastertool to create robotx.txt file

How can I remove or disable.

1 Answer 1


WordPress generate a dynamic robots.txt which does not physically exists. To remove/disable it you have two options:

Option 1: Remove do_robots action in your theme functions.php or plugin

remove_action('do_robots', 'do_robots');

The action do_robots is still available to be added again by other plugins.

Option 2: Create a real robots.txt file, put it the root folder of your site. This will stop WordPress (or plugins) auto generate its own.

  • Hey cybmeta i add that a functions.php remove_action('do_robots', 'do_robots'); follow your step but can remove robots.txt file :( i am stuck
    – Irfan
    Jan 13, 2015 at 9:25
  • its take much time?
    – Irfan
    Jan 13, 2015 at 9:28
  • Is robots.txt physically exists in your server? If so, as explained in the answer, removing the action won't work. Also, if you remove the action and later a plugin execute it again the robots.txt will be generated anyway. Disable all plugins and use a core theme to see if there is any plugin generating the file or go with the option 2 and create your own robots.txt in the server.
    – cybmeta
    Jan 13, 2015 at 9:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.