hello! Today we’re going to learn about the rel="
nofollow
” attribute, which plays an important role in HTML. In this lesson, I’ll walk you through the concept of rel="nofollow
“, its use cases, and when to use it and when not to use it.
1️⃣ The concept of rel="nofollow"
rel="nofollow
” is an attribute used in the <a>
tag in HTML that tells search engines not to follow the link. This means that links with this attribute are not crawled by search engines and do not affect the search ranking (PageRank) of the linked page.
example code:
<a href="https://example.com" rel="nofollow">Example Site</a>
the code above applies the rel="nofollow
” attribute to the text “Example Site”, telling search engines not to follow that link.
use cases for 2️⃣ rel="nofollow"
rel="nofollow
” is primarily used in the following situations
1.user-generated content: Links embedded inuser-generated content such as blog comments, forum posts, etc. cannot be guaranteed to be authoritative. In such cases, rel="nofollow"
is applied to prevent SEO impact due to spammy links.
example code :
<a href="https://spam-site.com" rel="nofollow">Check this out!</a>
2.ads and paid links: Links generated through ads or sponsorships can use rel="nofollow
” to clarify their commercial intent so that they don’t impact search engine optimization.
example code:
<a href="https://spam-site.com" rel="nofollow">Check this out!</a>
this link is added by a sponsorship, and we apply rel="nofollow
” to make sure search engines recognize it as an advertising link.
3.links to untrusted sites: Links to external sites that are not relevant to your content or are untrusted can have a negative impact on your SEO. in these cases, apply rel="nofollow"
to prevent search engines from following the link.
example code:
<a href="https://untrusted-site.com" rel="nofollow">Untrusted Site</a>
this link leads to an untrusted site, so we apply rel="nofollow"
to minimize the impact on SEO.
3️⃣ When to use rel="nofollow"
- user-generated content: Links in comments or posts written by users are likely to be spam, so apply
rel="nofollow
” to prevent search engines from following them. - ads and sponsored links: Use
rel="nofollow"
for links added due to paid ads or sponsorships so that search engines don’t mistake them for natural recommendations. - links from untrusted sources: Links to unreliable or low-quality sites can have a negative impact on SEO, so apply
rel="nofollow
” in these cases.
4️⃣ When not to use rel="nofollow"
- links to authoritativesources: Links to authoritative sources, such as authoritative organizations and official websites, can have a positive impact on SEO, so you should not use
rel="nofollow
” in these cases. - internal links: Internal links to other pages within your own website help your site structure and SEO, so you don’t need to apply
rel="nofollow
“. - natural editorial links: External links that are added naturally in the flow of your content, and do not need to use
rel="nofollow
” as long as the link is authoritative and relevant.
5️⃣ Additional link attributes
in 2019, Google introduced the rel="sponsored
” and rel="ugc
” attributes to further clarify the nature of a link:
rel="sponsored"
: use for links that are paid for, such as ads or sponsorships.- example code :
<a href="https://sponsored-site.com" rel="sponsored">Sponsored Link</a>
rel="ugc"
: use for links generated from User Generated Content.- example code :
<a href="https://user-link.com" rel="ugc">User's Link</a>
by utilizing these attributes to clearly indicate the nature of the link, you can help search engines understand exactly what it is.
so, we’ve covered the concept of rel="
nofollow
,” its use cases, and when to use it and when not to use it. To help you understand, let’s use an analogy: rel="nofollow
” is the HTML term for when we give someone directions and advise them, “Don’t go down that road, it’s dangerous.”