Dofollow Backlink Code: HTML Examples and How Google Reads Them

A dofollow backlink is a normal HTML link with no rel attribute, so it passes ranking credit by default. Here is the exact code for dofollow, nofollow, sponsored and ugc links.
Quick answer: Dofollow backlink code is a plain HTML anchor tag with no rel attribute, like a link to a page with anchor text and nothing else. A link is dofollow by default, so there is no special code to add. The rel attribute only changes things when it says nofollow, sponsored, or ugc, which tell Google not to count the link for rankings.
TL;DR: A dofollow link is a normal link. The code only gets interesting when you add rel="nofollow", rel="sponsored", or rel="ugc".
Key takeaways
- Dofollow backlink code is a plain anchor tag with no rel attribute, and a link passes ranking credit by default.
- Adding rel="nofollow" tells Google not to count the link for rankings, and it has worked that way since Google introduced nofollow on January 18, 2005.
- Google added rel="sponsored" and rel="ugc" on September 10, 2019, so paid links and user content get their own labels.
- Since March 1, 2020, Google treats all three values as hints rather than strict orders, according to Google's Search Central blog.
- A nofollow link still brings traffic and visibility, even though it does not pass ranking credit.
- Checking a link's code takes seconds in any browser, and it is the fastest way to confirm what kind of link you earned.
What dofollow means in HTML
A dofollow link is the default state of a link on the web. When a page links to another page with a plain anchor tag, search engines may follow it and count it as a vote for the linked page. Nothing extra is needed, and there is no rel="dofollow" value in HTML. If you see that value in the wild, it does nothing.
The idea matters because links are how search engines judge trust. A dofollow link passes ranking credit from the linking page to the linked page. A link with a rel value does not pass that credit in the same way. That is the whole difference, and it is decided by a few characters inside the tag.
Most links you earn through outreach, guest posts, and press coverage are dofollow. Editors add them as normal links, and nobody thinks about the code. The links that carry a rel value are usually paid placements, comments, forums, and other spots where the site owner wants to mark the link as untrusted or commercial.
The four link codes
The code below shows a dofollow link. It is the simplest form a link can take, and it is the one you want when you earn a link.
<a href="https://example.com/guide">anchor text</a>
The code below shows a nofollow link. The rel="nofollow" value tells search engines not to count the link for rankings. Use it for links you do not trust or did not earn through editorial review.
<a href="https://example.com/guide" rel="nofollow">anchor text</a>
The code below shows a sponsored link. The rel="sponsored" value marks a link that was paid for, such as an ad or a paid placement. Google's spam policies require paid links to carry this value or nofollow.
<a href="https://example.com/guide" rel="sponsored">anchor text</a>
The code below shows a ugc link. The rel="ugc" value marks a link from user-generated content, such as a comment or a forum post. It tells Google the link came from a visitor, not from the site's editors.
<a href="https://example.com/guide" rel="ugc">anchor text</a>
You can combine values in one attribute, such as rel="nofollow sponsored", when a link is both paid and untrusted. Google accepts more than one value, and the order does not matter. Keep the code simple, and never invent a value, because an unknown value is ignored.
A sponsored link is the correct label for any link you paid for, including ads and paid placements.
How Google reads rel values
Google introduced nofollow on January 18, 2005, together with Yahoo and MSN, to fight comment spam. The idea was simple: a link marked nofollow would not pass ranking credit, so spammers would stop chasing it. For fifteen years it worked as a strict order, and Google did not follow nofollow links at all.
That changed on September 10, 2019, when Google added sponsored and ugc to the set of values. The new labels let site owners say why a link should not count, instead of lumping every untrusted link under one label. A paid link could be marked sponsored, and a forum link could be marked ugc, which gave Google cleaner signals about each link.
Then, on March 1, 2020, Google changed how it treats all three values. According to Google's Search Central blog, nofollow, sponsored, and ugc became hints rather than directives, which means Google may choose to follow a hinted link for crawling or even for ranking in some cases. The practical rule has not changed: mark paid links, and do not expect a hinted link to pass full credit.
Paid links are common: a guest post averaged $295 direct and $461 through a vendor in 2026, according to BuzzStream's pricing data. See how much backlinks cost for the full breakdown.
Google introduced nofollow on January 18, 2005, added sponsored and ugc on September 10, 2019, and began treating all three values as hints on March 1, 2020, after 15 years of strict nofollow, according to Google's Search Central blog.
How to check a link's code
Checking a link takes seconds and needs no tools. Right-click the link in your browser, open the page source or the inspect panel, and look at the anchor tag. If the tag has no rel attribute, the link is dofollow. If it has rel="nofollow", rel="sponsored", or rel="ugc", it is not.
A backlink checker can do this at scale. Paste a page or a domain, and the tool lists the links it found, with the rel value of each one. That is useful when you want to audit a whole campaign, because checking hundreds of links by hand would take hours.
Watch out for links that look dofollow but are not. Some sites add rel="nofollow" to every outbound link through a plugin, including links in guest posts. Others use JavaScript to build links, which search engines may or may not see. A quick check after a placement goes live catches both problems while the editor still remembers your email.
| Attribute | Code | What Google does | When to use it |
|---|---|---|---|
| None (dofollow) | a href, no rel value | May pass ranking credit | Earned editorial links |
| nofollow | rel="nofollow" | Hint: do not count for rankings | Untrusted or unverified links |
| sponsored | rel="sponsored" | Hint: paid link, do not count | Ads and paid placements |
| ugc | rel="ugc" | Hint: user content, do not count | Comments and forum posts |
| Combined | rel="nofollow sponsored" | Hint: do not count | Paid links you also distrust |
The table above follows Google's guidance on qualifying outbound links, published in its Search Central documentation. The key point is that only the plain link passes credit by default, and every rel value exists to mark a link that should not count.
Expert verdict
Dofollow code is simple, and that is the point. The hard part is not writing the tag, it is earning a link from a page that matters. Spend your time on the pitch and the content, and check the code after the link goes live.
Pros: A plain link needs no special code. The rel system is clear and well documented. Checking a link takes seconds. Sponsored and ugc labels keep paid links inside Google's rules.
Cons: Site owners can add nofollow without telling you. JavaScript links may not count at all. A dofollow link from a spammy site can still hurt. The hint change in 2020 made the rules less absolute.
Best for: Anyone auditing earned links, site owners marking paid links correctly, and beginners learning how links work.
Not for: People looking for a code trick to boost rankings, because no tag can turn a weak link into a strong one.
Bottom line
Dofollow backlink code is a plain anchor tag with no rel attribute, and that is all there is to it. Add rel="nofollow" for untrusted links, rel="sponsored" for paid links, and rel="ugc" for user content. Then check every placement after it goes live, because the code on the page is what Google actually reads. For the full picture, read the guide to link building before your next campaign.
Frequently Asked Questions
What is dofollow backlink code?
It is a plain HTML anchor tag with no rel attribute. A link is dofollow by default, so no special code is needed for it to pass ranking credit.
Is there a rel="dofollow" attribute?
No. There is no such value in HTML, and adding it does nothing. A link without any rel attribute is already dofollow.
How do I make a link nofollow?
Add rel="nofollow" inside the anchor tag. For a paid link use rel="sponsored", and for a link in a comment or forum post use rel="ugc".
Do nofollow links help SEO at all?
They do not pass ranking credit, but they can still bring referral traffic and visibility. A nofollow link from a popular site is often worth more than a dofollow link from a dead one.
How can I check if a backlink is dofollow?
Right-click the link, inspect the page code, and look at the anchor tag. No rel attribute means dofollow, while nofollow, sponsored, or ugc means it is not.
Does Google still follow nofollow links?
Since March 2020 Google treats nofollow as a hint, so it may crawl a hinted link. It still does not count the link for rankings in the normal way.
Sources
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 TeamRelated guides





