Key takeaways
- Google accepts several rel values on one link, separated by spaces or commas, such as rel="ugc nofollow".
- noopener and noreferrer are browser behaviors and have no meaning for search engines.
- Only nofollow has a page-level form, as a robots meta tag or X-Robots-Tag header.
Nofollow link HTML is one attribute on an anchor tag: rel="nofollow". The catch is that it now has two siblings, sponsored and ugc, it can be combined with other values, it exists in a page-wide form as well, and it often gets confused with noopener and noreferrer. This is a markup reference for developers who need to get it right in a template, a CMS plugin or a comment system.
The three link values
Google's guide to qualifying outbound links defines them:
<!-- paid placement, ad, affiliate -->
<a href="https://shop.example/" rel="sponsored">Shop</a>
<!-- link inside a comment or forum post -->
<a href="https://user-site.example/" rel="ugc">their site</a>
<!-- link you don't want associated with your site -->
<a href="https://dubious.example/" rel="nofollow">this claim</a>
<!-- ordinary link: no rel needed -->
<a href="https://docs.example/">the docs</a>
Use nofollow only when neither of the other two fits. A regular editorial link needs no rel value at all; there is no dofollow keyword.
Combining values
rel takes a list. Google accepts spaces or commas as separators:
<a href="https://x.example/" rel="ugc nofollow">x</a>
<a href="https://y.example/" rel="ugc,nofollow">y</a>
Two reasons to combine:
- Backwards compatibility. Google's 2019 announcement suggests
rel="nofollow ugc"for services that never adopted the newer values. - Several facts at once.
rel="ugc sponsored"is valid for a user post that is also paid.
If you generate comment markup, a safe default is rel="ugc nofollow". Google allows you to drop ugc for members who have contributed good material consistently over time, so make the value conditional on a trust flag rather than hard-coding it forever.
nofollow is not noopener
These keep getting merged into one string, which is fine syntactically but different in meaning. According to MDN's rel reference:
| Value | Who reads it | What it does |
|---|---|---|
nofollow |
Search engines | Hints that the site does not endorse the target |
noopener |
Browser | The new page gets no window.opener reference |
noreferrer |
Browser | No Referer header is sent; also implies noopener |
So rel="noopener noreferrer" on a target="_blank" link is a browser safety and privacy choice. It does nothing for search engines, and adding nofollow changes nothing in the browser. Decide each part on its own.
The page-wide form
Only nofollow exists outside the anchor tag. As a robots meta tag it covers every link on the page:
<meta name="robots" content="nofollow">
<meta name="robots" content="noindex, nofollow">
<meta name="robots" content="none"> <!-- same as noindex, nofollow -->
Google's robots meta documentation defines it as "Do not follow the links on this page." For files without a <head>, send it as a header:
location ~* \.pdf$ {
add_header X-Robots-Tag "noindex, nofollow";
}
When rules conflict, Google applies the most restrictive one. sponsored and ugc have no page-level form.
What not to use it for
- Internal links. For links within your own site, Google's guide points to a robots.txt disallow rule, not nofollow.
- Hiding a page. Nofollow is not an indexing control. Allow crawling and use
noindexinstead. Google does not supportnoindexin robots.txt. - Expecting a hard block. Since 2019 all three values are hints for ranking, and nofollow became a hint for crawling and indexing on March 1, 2020. Linked pages can still be found through sitemaps or other sites.
The one case you must get right
Paid links. Google's spam policies treat links bought or sold for ranking as link spam, and accept paid links that carry sponsored or nofollow. If your template renders affiliate or sponsor links, put the value in the component, not in the editor's hands. Marking something sponsored that wasn't paid costs little; Google said the worst case is that the link isn't credited.
A simple pattern is to derive the value from data the component already has, so nobody types it by hand:
function linkRel({ paid, userPosted, trustedAuthor, vouched }) {
const rel = [];
if (paid) rel.push("sponsored");
if (userPosted && !trustedAuthor) rel.push("ugc", "nofollow");
if (!paid && !userPosted && !vouched) rel.push("nofollow");
return rel.join(" ") || undefined; // undefined: render no rel at all
}
Returning nothing for the ordinary case matters. Writing an empty rel="" or a made-up dofollow adds noise to your HTML and tells search engines nothing. If the link also opens in a new tab, append noopener separately; it belongs to a different concern.
Checking what you shipped
For your own pages, view source or the element inspector shows the final rel. To see how other sites mark links pointing at a domain, seogeoaeo.ai's backlink lookup lists the 100 strongest linking sites with the share of each site's linking pages that are followed rather than nofollow. It costs 70 credits per run, works per domain, and its figures are the data provider's estimates.
Frequently asked questions
How do I add nofollow to a link in HTML?
Add rel="nofollow" to the a tag. Use rel="sponsored" for paid links and rel="ugc" for user posts instead when they fit.
Is rel noopener the same as nofollow?
No. noopener and noreferrer change how the browser opens the link; nofollow is a hint to search engines.
Should I nofollow internal links?
Google's guide says to use a robots.txt disallow rule for links within your own site rather than nofollow.
Sources
- Qualify your outbound links to GoogleGoogle Search Central
- Robots meta tag specificationsGoogle Search Central
- Evolving "nofollow": new ways to identify the nature of linksGoogle Search Central
- Spam policies for Google web searchGoogle Search Central
- HTML attribute: relMDN
- Backlink Finderseogeoaeo.ai