Skip to content
Nazmul Nikhil
Menu

Noindex in HTML and HTTP Header (Ahrefs): Pick One Source

Ahrefs flags pages with noindex in both the meta robots tag and the X-Robots-Tag header. Learn why the header version is easy to miss and how to fix it.

Nazmul Nikhil

By

Head of SEO & Assistant Manager, Digital Marketing at Notionhive

Published 3 min read
Noindex in HTML and HTTP Header (Ahrefs): Pick One Source
Photo: Nicolas Ladino Silva on Unsplash

In short

Ahrefs flags "Noindex in HTML and HTTP header" when a page has a noindex directive both in its meta robots tag and in an X-Robots-Tag HTTP header. Either one keeps the page out of search results. Keep a single method so the setting is visible and easy to change, and check whether the page should be noindex in the first place.

A noindex set in two places is harmless while the page is meant to stay out of search. It becomes a real problem the day someone wants the page indexed and removes only one of them.

Why the header copy is the dangerous one

The meta tag shows in the page source and in your CMS settings. The header doesn't. It only shows in the HTTP response, so most people never look at it.

Google applies the more restrictive rule when directives conflict. If your CMS now says "index" but an old server rule still sends X-Robots-Tag: noindex, the page stays out of Google. A common source is a staging rule copied to production at launch.

How to fix it

  1. Confirm intent. If the page should rank, remove both directives. If it should stay out of search, keep one.

  2. Prefer the meta tag for HTML pages, because editors can see and change it in the CMS. Keep the header for PDFs, images and other files that can't hold a meta tag.

  3. Find the header with your browser's Network tab (click the page request, then Response Headers), or with any HTTP header checker.

  4. Remove it at the source: .htaccess, Nginx config, a CDN rule, or a plugin.

WordPress: the meta tag comes from your SEO plugin. The header usually comes from .htaccess, a security plugin, or a hosting setting that protects staging sites.

Shopify, Webflow and Wix: you can't set headers on these platforms directly, so look for a CDN or proxy rule in front of the site.

Custom builds and cPanel: search .htaccess for X-Robots-Tag. If you keep a staging subdomain on the same account, make sure its noindex rule is scoped to that subdomain only.

Free SEO audit

Not sure which issues matter on your site?

I'll review your site and send you the fixes that matter most, in plain English.

Get my free audit →

How to confirm the fix

Check the response headers and the page source. For pages you want indexed, run URL Inspection in Google Search Console. It reports whether indexing is allowed and whether noindex was found in a header or a meta tag.

A worked example

A company builds its new site on a staging subdomain. To keep staging out of Google, the developer adds this to the server config:

Header set X-Robots-Tag "noindex, nofollow"

The CMS also has "hide from search engines" ticked. At launch, the team unticks the CMS option and checks a page's source. No noindex tag, so it looks done. But the server config was copied to production with the header still in it. Weeks later, the site has barely any pages in Google, and nobody can see why in the HTML.

This is why Ahrefs' double-directive report is useful. It shows the header is there even after the meta tag is gone.

How to check a page in 30 seconds

  1. View the page source and search for noindex.

  2. Check the response headers (DevTools > Network > the page request) for x-robots-tag.

  3. For important pages, run URL Inspection in Google Search Console and read the "Indexing allowed?" line.

Common mistakes

  • Checking only the HTML. The header doesn't show in view-source.

  • Scoping a staging rule too broadly. On cPanel, an .htaccess file in the main web root affects every folder below it, including addon domains stored inside it.

  • Combining noindex with a robots.txt block. If robots.txt blocks the URL, Google can't crawl it to see the noindex at all.

This guide isn't affiliated with or endorsed by Ahrefs.

Sources and references

TAGSAhrefs Site AuditNoindex in html and http headerX-robots-tag noindexNoindex header and meta tag
Nazmul Nikhil

About the author

Nazmul Nikhil

Head of SEO & Assistant Manager, Digital Marketing at Notionhive

SEO and AI search consultant in Dhaka, Bangladesh, helping small and mid-size businesses in the USA, UK, Australia and Canada.

Need help with this?

Get it fixed with Technical SEO

I find the issues that cost you traffic and fix them, starting with the pages that matter most.

Keep reading

Related articles

All Site Audit Issues posts →

Get the next guide in your inbox

One email when a new SEO or AI search guide goes live.

Ready to grow?

Get a free audit of your website, or book a 30-minute call to talk through your goals.

Nazmul Hasan

Talk to Nazmul directly

Reply within 24h

WhatsApp +880 1682835118
nazmulnikhil@gmail.com