Published at
Updated at
Reading time
1min
This post is part of my Today I learned series in which I share all my web development learnings.

When Googlebot scans your pages, you want to provide as much information about your site as possible. It starts with semantic HTML but, of course, there's more!

Today I learned that you can define your relationship to sites you're linking to.

According to the Google Search documentation, you can use the rel attribute to define three different link relationships.

<!-- advertisements or paid placements -->
<a rel="sponsored" href="https://cheese.example.com/Appenzeller_cheese">Appenzeller</a>

<!-- user-generated content -->
<a rel="ugc" href="https://cheese.example.com/Appenzeller_cheese">Appenzeller</a>

<!-- "Please don't follow that link!" -->
<a rel="nofollow" href="https://cheese.example.com/Appenzeller_cheese">Appenzeller</a>

If you implement comments on your site, I can see how ugc becomes essential. It'd be a bummer to see spammers place random links on my sites to harm my Google Search ranking. Having the ability to tell Google Search "Hold on! That's not my stuff!" seems critical. ๐Ÿ™ˆ

Ant it turns out you can also combine these values in a single attribute. ๐Ÿ˜ฒ

<a rel="sponsored ugc" href="https://cheese.example.com/Appenzeller_cheese">Appenzeller</a>

Disclaimer: I'm not a SEO expert; I'm just pointing out that Googlebot understands these attributes! ๐Ÿ˜‰

If you enjoyed this article...

Join 5.5k readers and learn something new every week with Web Weekly.

Web Weekly โ€” Your friendly Web Dev newsletter
Reply to this post and share your thoughts via good old email.
Stefan standing in the park in front of a green background

About Stefan Judis

Frontend nerd with over ten years of experience, freelance dev, "Today I Learned" blogger, conference speaker, and Open Source maintainer.

Related Topics

Related Articles