The nofollow attribute goes inside the link tag: <a href="https://example.com/" rel="nofollow">. Google introduced it in January 2005 to fight comment spam: by flagging links left by visitors, blogs removed any incentive to flood them with ads. It still serves the same purpose today: saying “this link exists, but I don't vouch for it.”
nofollow, sponsored and ugc
On September 10, 2019, Google added two more specific values and changed the nature of nofollow:
| Value | What it signals |
|---|---|
rel="sponsored" | An advertising link or a link from a partnership (affiliate links, sponsorship) |
rel="ugc" | Links in user-generated content: comments, forum posts, reviews |
rel="nofollow" | A link the site does not wish to vouch for, in other cases |
Values can be combined, separated by a space or a comma: rel="nofollow ugc" is common, since other search engines don't necessarily support ugc. Google notes that nofollow is still recognized in every case; sponsored and ugc simply add more detail.
A hint, no longer a directive
Since 2019, Google has treated these three values as hints for ranking, and since March 1, 2020, for crawling and indexing as well. In practice, a nofollow link is no longer an absolute barrier: Google may choose to crawl the linked page or take the link into account. The practical consequence is that nofollow is not a way to hide a page. To keep a page out of the search results, you need a noindex tag or password protection; to keep it from being crawled, a rule in robots.txt.
Don't confuse it with the nofollow directive of the robots meta tag either, which applies to every link on a whole page rather than to a single link.
Common uses
- Advertising and affiliate links: this is the role intended for
sponsored. Affiliate plugins and ad networks often add it on their own. For links earned on other sites, see also our definition of link building. - Comments and forums:
ugc, which you can drop for regular, trusted contributors, as Google suggests. - Editorial sources: no nofollow. Google recommends using it only for sites you don't trust; citing a reputable source with a normal link is a sign of quality.
- Internal links: pointless. Adding nofollow to your own pages to steer crawling is not recommended; work on your internal linking instead.
For WordPress
Since WordPress 5.3, links in comments and the website URL of comment authors automatically get rel="nofollow ugc". For your own content, several SEO plugins add checkboxes to the editor's link dialog to mark a link as nofollow or sponsored; affiliate plugins often do this for every link they manage. To see which attribute a link carries, just switch the block to HTML mode or inspect the link in your browser.
On the security side, keep in mind that nofollow discourages spammers but doesn't stop them: an open comment form remains a target for bots. Anti-spam protection for your forms is still necessary, and a flood of dubious backlinks pointing to your site can't be fixed with this attribute, since those links depend on the sites that mention you.