SEO Basics

Dofollow vs Nofollow in HTML: How to Read the Code

By BacklinkPrice Team · Nov 27, 2026 · 7 min read
Cover for Dofollow vs Nofollow in HTML: an anchor tag with a rel attribute on a dark background

A dofollow link is a plain anchor tag with no rel value, while a nofollow link adds rel="nofollow". Learn to read the tag and verify every link you pay for.

Quick answer: A dofollow link is a plain anchor tag with no rel value, so Google may pass ranking credit through it. A nofollow link adds rel="nofollow" to the tag, which tells Google not to pass that credit. Google has treated all link attributes as hints since March 1, 2020, according to its Search Central blog. Check the HTML before you pay for a link.

TL;DR: Read the anchor tag. No rel value means the link can pass credit. rel="nofollow", rel="sponsored", or rel="ugc" tells Google what kind of link it is.

Key takeaways

  • A plain anchor tag with no rel attribute is a dofollow link, and Google may pass ranking credit through it.
  • A nofollow link adds rel="nofollow" to the anchor tag, which tells Google not to pass ranking credit.
  • Google added rel="sponsored" and rel="ugc" on September 10, 2019, according to its Search Central blog.
  • Since March 1, 2020, Google has treated all three attributes as hints, not as strict orders, according to the same blog post.
  • You can combine values, such as rel="ugc sponsored", and Google accepts the combination, according to its Search Central blog.
  • Always inspect the HTML of a link you paid for, because the visible page never shows the rel value.

How to read an anchor tag

Every link on a page is an anchor tag, and the tag holds all the facts. A basic link looks like this:

<a href="https://example.com/guide">Anchor text</a>

The href value is the destination. The text between the tags is the anchor text, which is what readers see and click.

A dofollow link has no rel attribute at all. The tag above is dofollow, because nothing in it tells Google to hold back credit.

A nofollow link adds the rel attribute:

<a href="https://example.com/guide" rel="nofollow">Anchor text</a>

The only difference is the rel value. Readers see the same link, and the click works the same way.

Dofollow vs nofollow explains what each choice means for rankings. This article shows how to spot the choice in the code itself.

The three rel values Google recognizes

Google recognizes three rel values for links, and each one says something different about the link.

Use rel="sponsored" for links created as part of advertisements, sponsorships, or other compensation agreements, according to Google's Search Central blog from September 10, 2019.

Use rel="ugc" for links inside user-generated content, such as comments and forum posts, according to the same blog post.

Use rel="nofollow" when you want to link to a page but do not want to imply any type of endorsement, including passing along ranking credit to another page, according to the same blog post.

The sponsored value is preferred for paid links, but nofollow is still accepted. Google's blog post says any link that is clearly an ad or sponsored should use sponsored or nofollow, with sponsored preferred.

HTML codeLink typeWhat it tells Google
No rel attributeDofollowMay pass ranking credit
rel="nofollow"NofollowDo not pass ranking credit
rel="sponsored"SponsoredPaid link, do not pass credit
rel="ugc"User contentWritten by a user, not the site
rel="ugc sponsored"CombinedUser content and paid

Google's Search Central blog from September 10, 2019, says all link attributes are treated as hints about which links to consider or exclude within Search, and the hint model took effect for crawling and indexing on March 1, 2020. Source: Google Search Central Blog, Evolving "nofollow", September 10, 2019.

Open any page in your browser and right-click the link, then choose Inspect. The developer tools panel opens with the anchor tag highlighted, and you can read the rel value directly.

You can also view the page source with Ctrl+U on Windows or Cmd+Option+U on Mac, then search for the link text. The source shows every anchor tag on the page.

Check the links you paid for this way. A seller can promise a dofollow link and deliver a nofollow one, and the page will look identical in both cases.

The same check applies to any placement. Is it safe to buy links depends on the tag, the site, and the disclosure, so verify all three before you pay.

Buy dofollow backlinks only after you confirm the tag. The price of a dofollow placement is higher because the credit passes, and a hidden nofollow tag means you paid the dofollow price for a nofollow link.

What changed in 2019 and 2020

The nofollow attribute was introduced in 2005 as a way to fight comment spam, according to Google's Search Central blog. It soon became the recommended way to flag advertising links too.

Before September 2019, Google would not count any link marked nofollow as a signal in its search algorithms. The link was ignored for ranking, and Google would not follow it.

On September 10, 2019, Google announced two new attributes, sponsored and ugc, and said all three would be treated as hints about which links to consider or exclude within Search.

The change took effect for ranking at once, and for crawling and indexing on March 1, 2020, according to Search Engine Land's coverage of the announcement.

Google said it made the change because it can now collect data on individual links, including the words within anchor text, and use that data to spot unnatural linking patterns.

Combining rel values

You can use more than one rel value on a single link, and Google accepts the combination. The values go in one rel attribute, separated by spaces.

A link in a paid guest post written by a user could carry both values:

<a href="https://example.com/guide" rel="ugc sponsored">Anchor text</a>

You can also pair nofollow with the new values for backward compatibility, such as rel="nofollow ugc", according to Google's Search Central blog.

Do not invent your own values. Only sponsored, ugc, and nofollow carry meaning for Google, and anything else is ignored.

WordPress adds rel="ugc nofollow" to comment links automatically, according to RyRob's 2026 guide, so check your own comment sections before you assume they pass credit.

Common HTML mistakes

The most common mistake is putting the rel attribute on the wrong tag. It belongs on the anchor tag, not on a surrounding div or paragraph.

Another mistake is using rel="dofollow". There is no such value. A dofollow link is simply a link with no rel attribute at all.

A third mistake is trusting a plugin's label. Some tools report a link as dofollow when the HTML says otherwise, so always read the tag yourself.

Google backlinks guidelines explain the policy side: buying or selling links for rankings is link spam, and paid links need rel="sponsored" or rel="nofollow" to stay inside the rules.

The link building checklist is simple: read the tag, confirm the value, and keep a record of what you bought.

Price follows the tag. Check pricing for what a verified dofollow placement costs, and treat any quote far below that range as a warning.

Frequently Asked Questions

Right-click the link and choose Inspect, or view the page source and search for the link text. A dofollow link has no rel attribute on its anchor tag, while a nofollow link shows rel="nofollow".

What does rel="nofollow" look like in code?

It looks like this: a link tag with rel="nofollow" added after the href value. The full tag reads as an anchor with an href, a rel value of nofollow, and the anchor text between the opening and closing tags.

Is rel="dofollow" a real HTML attribute?

No. There is no dofollow value in HTML. A dofollow link is simply a plain anchor tag with no rel attribute, and adding rel="dofollow" does nothing.

Yes. You can combine values in one rel attribute, such as rel="ugc sponsored" or rel="nofollow ugc". Google accepts the combination and reads each value as a hint.

Does nofollow still work after Google's 2019 change?

Yes, but as a hint rather than an order. Since March 1, 2020, Google treats nofollow, sponsored, and ugc as hints for both ranking and crawling, so Google may still use a nofollowed link as a signal in some cases.

No. Google says you do not need to change existing nofollows, and a nofollow used to block sponsored links will continue to be supported. Use sponsored on new paid links instead.

Expert verdict

Best for: anyone who buys, sells, or audits links and wants to verify the tag instead of trusting a promise.

Not for: anyone who never looks at page source, because the visible page hides the one fact that sets the price.

Pros: the anchor tag shows the truth in seconds; the three rel values cover every common case.

Cons: the hint model means no tag gives a firm guarantee, and sellers can change a tag after you pay.

Bottom line

Read the anchor tag before you pay for a link. No rel value means dofollow, rel="nofollow" means no credit, and rel="sponsored" is the right tag for paid links. Check the tag again after the link goes live.

Sources

BacklinkPrice Team
Written by
BacklinkPrice Team
Link building and backlink pricing research

The BacklinkPrice Team researches backlink prices, publisher sites and link building tools. We check prices and plans against each provider's own pages and date them, so you know how current the numbers are.

More from BacklinkPrice Team

Related guides