Back to HTML Notes
Topic #120

Nofollow Links

Learn how to correctly mark up links that should not pass search engine authority, distinguishing between user-generated content, sponsored ads, and general nofollow directives.

What it is

The rel attribute on an anchor tag tells search engines how to treat the link. Historically, rel="nofollow" was a directive to ignore the link entirely. In 2019, Google updated its interpretation: nofollow, sponsored, and ugc are now treated as "hints" rather than strict commands. This means Google may still crawl or index these links if they deem it relevant, but they generally will not pass PageRank (link equity) through them.

  • Nofollow: General indication that the site owner does not endorse the linked page.
  • Sponsored: Specifically for paid placements, advertisements, or affiliate links.
  • UGC (User Generated Content): For comments, forum posts, or other content created by users.

Why it matters

  • Compliance: Using sponsored for ads helps you comply with Google’s Webmaster Guidelines regarding paid links.
  • Spam Prevention: Marking user comments as ugc prevents comment spammers from gaining SEO value from your site.
  • Link Equity Control: It allows you to manage which external sites receive authority from your domain.
  • Clarity: Differentiating between ad links and organic links provides better data signals to search engines.

Syntax or steps

Add the appropriate rel value inside the opening <a> tag. You can combine values using spaces if necessary, though usually one specific type is best.

<a href="URL" rel="VALUE">Link Text</a>

Example

Here is a realistic snippet showing three different types of non-endorsed links:

<p>Check out our <a href="/products" rel="sponsored">partner deal</a>.</p>
<p>Read this <a href="https://example.com/blog" rel="ugc">user review</a>.</p>
<p>Visit this <a href="https://random-site.com" rel="nofollow">external resource</a>.</p>

Explanation:

  • The first link uses rel="sponsored" because it represents a commercial relationship.
  • The second uses rel="ugc" because the text implies it comes from a community member.
  • The third uses rel="nofollow" as a generic fallback for untrusted or unendorsed external links.

Common mistakes

  • Using Nofollow for Ads: Before 2019, nofollow was standard for ads. Now, use sponsored to be precise and compliant.
  • Missing Quotes: Always wrap attribute values in quotes, e.g., rel="nofollow", not rel=nofollow.
  • Overusing Nofollow: Do not apply nofollow to internal navigation or trusted partner links unless there is a specific reason not to pass equity.
  • Confusing Meta Tags: Remember that meta name="robots" content="nofollow" applies to all links on a page, whereas the anchor tag rel applies only to that specific link.

When to use it

Scenario Recommended Attribute Reason
Paid Ad / Affiliate Link rel="sponsored" Explicitly identifies commercial intent per guidelines.
User Comments / Forum Posts rel="ugc" Identifies content not vetted by the site owner.
Untrusted External Link rel="nofollow" General signal that you do not endorse the target.
Trusted Organic Link No rel attribute Allows full link equity transfer.

Practice

Guided Exercise: Write an HTML anchor tag linking to https://affiliate-site.com that indicates it is a paid partnership.

Solution Hint: Use rel="sponsored".

Challenge: Modify a standard blog comment section link so that it passes the correct hint to search engines indicating the content is user-generated.

Expected Output: <a href="..." rel="ugc">...</a>

Quick check

Question: If you have a link in a blog post that is part of a paid sponsorship, which rel value is most appropriate?

Answer: sponsored

Summary

Use rel="sponsored" for paid links, rel="ugc" for user-generated content, and rel="nofollow" for general unendorsed links. These attributes serve as hints to search engines about the nature of the link relationship, helping maintain compliance and control over link equity distribution.

Want to go beyond the notes?

Join Coding Now Tech Institute's HTML course — live mentorship, real projects, and 100% placement support.

Enroll Now — Free Demo Available

Nofollow Links – FAQs

Quick answers about learning Nofollow Links in HTML.

This free note from Coding Now Tech Institute explains Nofollow Links in HTML — concept, syntax and worked code examples you can copy, run and revise before interviews.
Yes. Every HTML topic on Coding Now Tech Institute, including Nofollow Links, is 100% free with no signup required.
With focused practice, most students grasp Nofollow Links in 1–3 days from these notes; pairing it with Coding Now Tech Institute's mentor-led course takes you to job-ready depth faster.
Use the code examples in this note, then ask doubts for free on the Coding Now Tech Institute Community (/community) — expert instructors answer within 24 hours.
Call NowEnroll Now