A page-level robots nofollow silently disables every link on the page
I wasted an afternoon on a link audit last week. Every anchor on the page looked clean: no rel="nofollow", no redirect, no JavaScript handler, correct href. It passed nothing. The reason was one tag in the document head
I wasted an afternoon on a link audit last week. Every anchor on the page looked clean: no rel="nofollow", no redirect, no JavaScript handler, correct href. It passed nothing.
The reason was one tag in the document head:
<meta name="robots" content="nofollow" />
That is it. When a page carries a page-level nofollow robots directive, every link on that page is treated as nofollow - including anchors with no rel attribute at all. Reading the anchor tells you nothing on its own.
Why this is easy to miss
Most link-checking advice says "inspect the anchor". So you inspect the anchor, see rel="noopener noreferrer", conclude it is fine, and move on. The directive that actually decides the outcome is somewhere else in the document.
It is also not rare. Platforms that do not want to vouch for user-supplied links set it at the page level, because that is one tag instead of sanitising every anchor a user pastes in. Reasonable engineering decision, invisible to anyone reading the HTML of a single link.
The ten-second check
Two lines in the console, before you trust any anchor:
const meta = document.querySelector('meta[name="robots"]')?.content ?? "";
const pageNoFollow = /nofollow/i.test(meta);
const links = [...document.querySelectorAll('a[href^="http"]')];
const live = pageNoFollow ? [] : links.filter(a => !/nofollow/i.test(a.rel));
console.log({ meta, pageNoFollow, total: links.length, live: live.length });
If pageNoFollow is true, live is empty and the page is worth nothing for link building regardless of how the anchors look.
An HTTP header does the same job from the other direction - X-Robots-Tag: nofollow - so check curl -sI too when a page has no meta tag but the links still behave oddly.
The related trap: a DOI you think you have
Different domain, same shape of mistake. I published a small dataset to an InvenioRDM-based repository. The DOI field defaults to "I already have one". Fill the form honestly, hit publish, and it refuses:
Missing DOI for required field
The draft is not recoverable from that state. The default assumes you are depositing something previously published; if you are minting a new identifier you have to pick "No, I need one" and reserve it first, before filling the rest of the form. One wrong default, one destroyed draft.
Both bugs are the same class: a default that is correct for most users and silent when it is wrong for you.
If you do mint a DOI, put it in the markup
A DOI is only useful if machines can find it. For a dataset, schema.org has Dataset, and the identifier belongs in two places:
{
"@context": "https://schema.org",
"@type": "Dataset",
"name": "Publisher RPM Index",
"identifier": "https://doi.org/10.5281/zenodo.24465801",
"sameAs": "https://doi.org/10.5281/zenodo.24465801",
"license": "https://creativecommons.org/licenses/by/4.0/",
"url": "https://pubsignal.in/data/publisher-rpm-index"
}
identifier states the persistent ID. sameAs links the entities. Neither changes the page's canonical URL - the DOI points at the archived snapshot, while the live page stays the canonical document. Conflating the two is how you end up with the archived copy cited as the source.
Validate it by parsing the JSON-LD yourself and checking that identifier survived. Schema helpers silently drop properties they do not know about, and a dropped identifier looks exactly like a page that never had one.
The checklist
- Read
<meta name="robots">before reading any anchor. - Read
X-Robots-Tagfrom the response headers as well. - Never trust a platform's claim that its links are do-follow. Read the page.
- If you are minting an identifier, reserve it before filling the form.
- Emit it as
identifier+sameAs, and leavecanonicalalone.
The dataset behind the DOI example is here, if you want to see the markup in the wild: PubSignal Publisher RPM Index.
Google's reference for the robots meta tag: developers.google.com.
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.