How do I remove an X-Robots-Tag noindex header that blocks AI crawlers?
A response header like X-Robots-Tag: noindex — or the AI-specific noai directive — tells crawlers to drop the page entirely, removing it from both classic search and AI answers. Find where the header is set (web server config, CDN rule, or application middleware), delete the directive, then confirm with curl -I.
Agents affected
How to tell you have this problem
- Our scanner reports "X-Robots-Tag header sets noindex" (check x_robots_tag_noindex, critical) or "noai/noimageai" (x_robots_tag_blocks_ai, critical).
- The page vanished from Google and AI answers even though robots.txt allows everything.
- curl -I shows a header like "X-Robots-Tag: noindex" or "X-Robots-Tag: noai".
How to fix it
Confirm the header and its exact value:
curl -sI https://yoursite.com/ | grep -i x-robots-tagFind and remove the source. In nginx, look for and delete a line like this in your server/location blocks (then reload nginx):
# nginx — DELETE this line if present, then: sudo nginx -s reload add_header X-Robots-Tag "noindex" always;In Apache, either delete the matching "Header set X-Robots-Tag" line, or force-remove a header set upstream:
# Apache (.htaccess or vhost) <IfModule mod_headers.c> Header always unset X-Robots-Tag </IfModule>Also check layers that inject headers: CDN response-header transform rules (Cloudflare → Rules → Modify Response Header), your framework config (e.g. a headers() entry in next.config), hosting dashboards, and SEO plugins. Staging configs that set noindex often leak into production this way.
Re-run the curl check — the header should be gone (or contain only safe values like "index, follow") — then re-scan.
FAQ
What is the difference between noindex and noai?
noindex is a standard directive that removes the page from search indexes — and by extension from AI answers built on them. noai/noimageai are newer, non-standard directives aimed specifically at AI training. Our scanner flags both as critical because either one suppresses AI visibility.
Is X-Robots-Tag different from a meta robots tag?
Same directives, different delivery: the meta tag lives in the HTML, the X-Robots-Tag is an HTTP header. Headers win in practice and are easy to miss because they are invisible in view-source — always check with curl -I.
I only want to noindex some pages. How do I scope it?
Set the header only in the specific location/route (nginx location block, Apache Directory/Files section, or per-route middleware) instead of server-wide. Our scanner checks each audited URL individually, so scoped noindex on genuinely private pages will not flag your public ones.
Not sure if your site has this issue?
Run a free scan — we test this check (and 60+ others) against your live site and give you the exact paste-ready fix. No signup needed.