Technical for WordPress websites

How do I allow or block AI crawlers on a WordPress website?

The short answer

Edit your robots.txt: WordPress generates a virtual one, which you can replace by uploading a robots.txt file to the site's root folder or edit through most SEO plugins. Add a group for each crawler you want to block, but remember that blocking OAI-SearchBot keeps your site out of ChatGPT search answers, and check that security plugins or your host aren't blocking crawlers you meant to allow.

Where robots.txt lives on WordPress

WordPress creates a virtual robots.txt automatically. It isn't a real file on the server; WordPress builds it when someone requests /robots.txt. You can change it in three ways:

  • An SEO plugin. Most popular SEO plugins include a robots.txt editor in their settings.
  • A physical file. Upload a robots.txt file to the site's root folder by FTP or your host's file manager. A real file takes priority over the virtual one.
  • Code. Developers can change the virtual file with WordPress's robots_txt filter.

Use one method only, or you may edit one version while another is being served. After any change, open yoursite.com/robots.txt to check what crawlers actually get.

How to block or allow a specific AI crawler

Each crawler gets its own group. To block OpenAI's training crawler, for example:

User-agent: GPTBot Disallow: /

To allow a crawler, either leave it out (crawlers are allowed by default) or give it a group with "Allow: /".

Which crawlers to allow

OpenAI runs crawlers for different jobs:

  • OAI-SearchBot finds pages for ChatGPT search. Blocking it keeps your site out of ChatGPT search answers.
  • GPTBot collects content that may be used for training. OpenAI says blocking it doesn't remove you from search answers.
  • ChatGPT-User visits pages on a user's behalf. Because a person starts each of those visits, OpenAI says robots.txt rules may not apply to it.

Google uses a separate token, Google-Extended, to control whether content is used for some of its AI models; it doesn't affect Google Search. Other companies have their own crawlers. See which AI crawlers to allow and whether blocking Google-Extended removes you from AI Overviews.

When robots.txt isn't the whole story

A crawler allowed in robots.txt can still be blocked by a security plugin, a hosting firewall or a CDN rule, and you may never see it. If you want AI tools to read your site, check those too; see whether your host or CDN is blocking AI bots.

Robots.txt is also a request, not a lock. Well-known crawlers say they follow it, but it won't stop every scraper or remove what AI tools already know.

Related questions

More questions from WordPress websites about AI crawlers and technical AI SEO

AI crawlers and robots.txt - questions every business asks

Next questionCan I add an llms.txt file to a WordPress website?

Find out whether ChatGPT and other AI tools recommend your WordPress website

Get an AI visibility audit showing whether ChatGPT and other AI tools recommend your WordPress website when people ask for what you offer, which competitors they name instead, and how you compare.

Request my AI visibility audit