In short
Ahrefs flags "Nofollow in HTML and HTTP header" when a page sets nofollow both in its meta robots tag and in an X-Robots-Tag HTTP header. Either method alone works, so Ahrefs advises keeping only one. Remove the duplicate, and first check whether the page should be nofollow at all.
This issue doesn't mean anything is broken today. It means the same instruction lives in two places, and two places can drift apart.
What the two methods look like
In the HTML head:
<meta name="robots" content="nofollow">
In the server response:
X-Robots-Tag: nofollow
Google treats both the same. Any rule valid in a robots meta tag also works as an X-Robots-Tag, and when rules conflict, the more restrictive one wins.
Why a duplicate causes trouble later
The risk is in maintenance. Picture a site that wants its links followed again. A developer removes the meta tag in the CMS, but the header is still set in .htaccess or the server config. The page stays nofollow, and nobody can see why in the page source. Keeping one source of truth avoids that hunt.
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.
How to fix it
Decide whether the page should be nofollow at all. Page-level nofollow applies to every link on the page, and that's rarely what you want on a public page. If it shouldn't be nofollow, remove both.
If it should stay nofollow, keep one method. Use the meta tag for HTML pages and the header for PDFs and other files.
Find the header. Check the response headers in your browser's Network tab, then look in .htaccess, the Nginx config, a CDN rule, or a security plugin.
WordPress: the meta tag usually comes from Yoast or Rank Math (Advanced > robots settings). The header usually comes from a security or caching plugin, or from .htaccess.
Shopify, Webflow and Wix: you can't set custom response headers directly on these platforms, so a duplicate usually comes from a CDN in front of the site, such as Cloudflare. Remove the rule there.
Custom builds and cPanel: look for Header set X-Robots-Tag in .htaccess or add_header X-Robots-Tag in Nginx.
How to confirm the fix
Check the response headers and page source again, then recrawl in Ahrefs.
How to see the header for yourself
In Chrome, open DevTools (F12), go to the Network tab, reload the page, click the first request (the page itself), and look under Response Headers for x-robots-tag. From a terminal:
curl -sI https://example.com/page | grep -i x-robots-tag
If nothing prints, the header isn't set, and the nofollow comes only from the meta tag.
Which one to keep
| Keep the meta tag when... | Keep the header when... |
|---|---|
| The page is HTML and editors manage it in a CMS | The file is a PDF, image or other non-HTML file |
| You want the setting visible in the page source | You need one rule for a whole folder or file type |
Common mistakes
Removing the meta tag and assuming the page is fixed. Check the headers again. The header copy is the one people forget.
Setting the header site-wide by accident, for example with a rule meant for one folder in .htaccess.
Using page-level nofollow to hide links from Google. It's a hint, and it covers every link on the page, including your own navigation.
This guide isn't affiliated with or endorsed by Ahrefs.
Related issues
Sources and references
Ahrefs Help, What does "Nofollow in HTML and HTTP header" mean (checked Dec 1, 2026)
Google Search Central, Robots meta tag, data-nosnippet, and X-Robots-Tag specifications (updated Mar 24, 2026)

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.



