Rel Nofollow in HTML: How to Add and Check It

Adding rel nofollow in HTML takes one attribute on the anchor tag. This guide shows the code for nofollow, sponsored, and ugc, how to add them in WordPress and site builders, and how to check them.
Quick answer: To add nofollow in HTML, write rel="nofollow" inside the anchor tag, as in <a href="https://example.com" rel="nofollow">Example</a>. Use rel="sponsored" for paid links and rel="ugc" for user content, and check your work in the browser before you publish, according to Google Search Central.
TL;DR: One attribute on the anchor tag sets the link type. WordPress and site builders add it through a checkbox or a setting, and your browser's inspect tool shows whether it worked.
Key takeaways
- A nofollow link in HTML is
<a href="https://example.com" rel="nofollow">Example</a>, with the rel attribute inside the opening tag.
- Use rel="sponsored" for paid links, rel="ugc" for user content, and rel="nofollow" for links you do not endorse, according to Google Search Central.
- WordPress adds rel="ugc external nofollow" to comment author links by default, so check your own comments before you worry about them.
- You can combine values, such as rel="ugc sponsored", and Google treats the combination as valid, according to Google Search Central.
- Check a link's tags in WordPress or in your browser, and fix stray nofollows on links that should pass credit.
The nofollow code, line by line
A normal followed link looks like this: <a href="https://example.com">Example</a>. The anchor tag opens with the href, the link text sits in the middle, and the tag closes. Nothing in that code tells a search engine anything about the link.
A nofollow link adds one attribute: <a href="https://example.com" rel="nofollow">Example</a>. The rel attribute names the relationship between your page and the linked page, and the value nofollow says you do not endorse it.
The other two values work the same way. A paid link uses rel="sponsored", and a link in user-generated content uses rel="ugc". Google introduced both on September 10, 2019, next to the nofollow value that had existed since 2005, according to Google Search Central.
| Code | Meaning | When to use it |
|---|---|---|
| rel="nofollow" | Do not endorse this page | Untrusted or unvetted links |
| rel="sponsored" | This link is paid advertising | Ads, affiliates, and paid placements |
| rel="ugc" | This link came from a user | Comments and forum posts |
| rel="ugc sponsored" | Paid link inside user content | Sponsored comments and posts |
| No rel attribute | An editorial link you endorse | Normal links in your content |
Google added rel="sponsored" and rel="ugc" on September 10, 2019, next to rel="nofollow", which had existed since January 18, 2005. All three became hints for ranking at once, and hints for crawling on March 1, 2020. Source: Google Search Central Blog, September 2019.
How to add nofollow in WordPress
WordPress gives you two routes. In the block editor, select the link, open the link settings, and turn on the option that marks the link as nofollow or sponsored. The editor writes the rel attribute into the HTML for you.
For links in comments, WordPress does the work itself. Comment author links get rel="ugc external nofollow" by default, which tells Google the link came from a user and should not pass ranking credit.
For bulk changes, a plugin can add or remove nofollow across many links at once, but check the result on a few pages before you trust it. The step-by-step guide is in How to add nofollow links in WordPress.
How to add nofollow in site builders
Site builders each handle the attribute in their own way, and the setting usually sits in the link editor for the page or post. Shopify's route is set out in How to add nofollow links in Shopify.
Squarespace's route is set out in How to add nofollow links in Squarespace, including which links the platform marks for you.
Webflow lets you type the value by hand in the element settings panel, and the steps are in How to add nofollow links in Webflow.
Wix's route is set out in How to add nofollow links in Wix.
Which attribute to use
Pick the attribute by asking where the link came from. Paid links get sponsored, user content gets ugc, and anything you do not endorse gets nofollow. The three are compared in Sponsored vs nofollow vs ugc.
Never mark a link sponsored by mistake. Google says the only wrong attribute is flagging a normal link as sponsored, because that tells Google the link is advertising when it is not, according to Google Search Central.
When in doubt, use nofollow. It is the safe default for a link you do not fully trust, and Google treats it as a hint, not a penalty, so a wrong nofollow costs you ranking credit but never triggers a manual action by itself.
How to check a link's tags
The fastest check is your browser. Right-click the link, choose Inspect, and read the anchor tag in the panel that opens. The rel attribute shows the values the page actually sends, and a missing rel means the link is followed.
Browser extensions can highlight nofollow links on any page, and free checkers report the attribute for a whole page at once. If you need to tell followed from nofollow across a backlink profile, read How to check if a backlink is dofollow.
Check your most important links once a quarter. A plugin or a theme update can add nofollow where it does not belong, and a single wrong tag can cut a good link out of your profile without any warning.
Frequently Asked Questions
How do I add nofollow to a link in HTML?
Add rel="nofollow" inside the opening anchor tag, as in <a href="https://example.com" rel="nofollow">Example</a>. The attribute sits next to the href, and the rest of the tag stays the same.
How do I add nofollow in WordPress?
Select the link in the block editor, open the link settings, and turn on the nofollow or sponsored option. WordPress writes the rel attribute into the HTML for you, and comment author links get it by default.
What is the difference between nofollow and sponsored in HTML?
Both use the rel attribute, but nofollow means you do not endorse the page, while sponsored means the link is paid advertising. Use sponsored for any link you were paid to place.
Can I use more than one rel value?
Yes. Google says rel="ugc sponsored" and rel="nofollow ugc" are both valid. Combining values is useful when a link is both user-generated and paid, or for backward compatibility.
How do I check if a link is nofollow?
Right-click the link in your browser, choose Inspect, and read the anchor tag. If the tag has rel="nofollow", rel="sponsored", or rel="ugc", the link carries that attribute. No rel value means the link is followed.
Does nofollow in HTML affect the user?
No. The attribute only changes how search engines treat the link. Readers can still click it, and the linked page still gets the traffic.
Expert verdict
Best for: anyone who edits HTML by hand or checks links in WordPress and site builders.
Not for: sites that never touch code, where the editor's checkbox does the job.
Pros: one attribute does the whole job; easy to check in the browser; works everywhere.
Cons: easy to mistype; a plugin can add it where it does not belong.
Bottom line
One attribute on the anchor tag sets the link type: nofollow for untrusted links, sponsored for paid ones, and ugc for user content. Add it in your editor, check it in the browser, and fix stray tags once a quarter.
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





