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
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.