Mastodon Website Verification and the rel attribute and the me keyword

Nov 12, 2024

After setting up the website, the first thing I wanted to do was put a link to the blog on my mastodon profile. It turns out Mastodon has a verification feature, which allows us to verify that the linked website is actually owned by the Mastodon account owner. Neat!

On the verification settings page, there are instructions on how to do it and a simple explanation.

The website asks me to add the following line to my blog to allow it to verify my identity:

<a rel="me" href="https://hachyderm.io/@prateekja">Mastodon</a>

Let’s break down how this particular anchor works and how it will help Mastodon verify my identity.

This is a normal anchor that is placed on this website, which the Mastodon instance will look for when it visits this website. Mastodon could have generated a unique ID for me and asked me to put that here, which they could have easily identified and verified.

The key here is the rel HTML attribute which defines the relationship between a linked resource and the current document. The linked resource is my Mastodon profile and the current document is this page on my website. The me keyword for the rel attribute is one of the many values that are possible. The keyword me was introduced in the XFN specification to define Identity1.

  1. There are other keywords introduced in this specification that are less widely used, which makes sense. It is possible to build a social graph with keywords like met, acquitance, friend etc. which seems powerful. This specification is so old that it lists Orkut as an example of a website using the me keyword. 

← More Posts