Guides

Let AI crawlers in on WordPress

How do I edit robots.txt on WordPress?

WordPress is the easiest of the major platforms for this, because your SEO plugin almost certainly has a robots.txt editor built in. Read the finding first, though: if the block is at your firewall rather than in the file, editing the file changes nothing.

Editing robots.txt

WordPress serves a virtual robots.txt when no real file exists, which is why you may not find one over FTP. Edit it through whichever plugin you have.

  • Yoast SEO. Yoast, then Tools, then File editor.

  • Rank Math. Rank Math, then General Settings, then Edit robots.txt.

  • All in One SEO. All in One SEO, then Tools, then Robots.txt Editor.

  • No SEO plugin. Create a plain text file named robots.txt and upload it to the same folder as wp-config.php using your host file manager. A real file takes priority over the virtual one.

Add the rules rather than replacing the file, then reload yourdomain.com/robots.txt to confirm.

When it is not the file

Security plugins are the usual culprit on WordPress, and they block by user agent without telling you. If the finding says a crawler was turned away by your firewall, look in Wordfence under Blocking, or in your host security settings, or at Cloudflare if you use it.

Allow the four answer crawlers by name. Whoever installed the security plugin set this up, and if that was not you, the crawler names are all they need.

If your screens do not look like this, the wording has moved rather than the setting. Search your platform for the words in bold above. If you still cannot find it, send us the scan link and we will tell you where it is on your setup.

Was this page helpful?

Still stuck? Send us a message. A scan link in it makes it much faster to answer.