Skip to content
Nazmul Nikhil
Menu

Nofollow in HTML and HTTP Header (Ahrefs): Is It a Problem?

Ahrefs flags pages that set nofollow in both the meta robots tag and the X-Robots-Tag header. Here's why one method is enough and how to remove the other.

Nazmul Nikhil

By

Head of SEO & Assistant Manager, Digital Marketing at Notionhive

Published 3 min read
Nofollow in HTML and HTTP Header (Ahrefs): Is It a Problem?
Photo: Dima Pechurin on Unsplash

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.

Get my free audit →

How to fix it

  1. 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.

  2. If it should stay nofollow, keep one method. Use the meta tag for HTML pages and the header for PDFs and other files.

  3. 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.

Sources and references

TAGSAhrefs Site AuditNofollow in html and http headerX-robots-tag nofollowMeta robots nofollow
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