Link Your Website to Mastodon via Metadata

Since hackers and normies alike check out Mastodon nowadays, here’s an undocumented (as far as I can tell) variant to connect your website link to your Mastodon profile.

Update 2022-05-16: Dave Barr made a much nicer illustrated guide for this!

The general flow is this:

  1. Add your website link to your profile page.
  2. Add a link from your website to your Mastodon profile.

After a while, the Mastodon server will pick up this backlink and mark the website as “verified”. That’s supposedly indicating this is really your website, and you’re not an imposter.

The docs usually only recommend regular links of the form:

<a rel="me" href="https://mastodon.social/@ctietze">My Mastodon Profile</a>

But if you don’t want to plaster your web pages with clickable Mastodon links, metadata links work as well:

<link rel="me" href="https://mastodon.social/@ctietze" />

As I said, I couldn’t find this in the docs so I just tried and it works. Just takes a while to register.

Update 2022-05-10: The Mastodon docs don’t mention this, but I was informed that this is expected behavior according to the HTML spec – because a [hyperlink can be many things](https://html.spec.whatwg.org/#hyperlink], and a <link> tag semantically links the whole page, while an <a> link links the anchor text as context. Ah well, I cannot recommend trying to read the HTML specs, by the way, it’s, uh, a very complex document. Either way, I’m happy to inform y’all that Mastodon servers are built ‘to spec’ in this case. That’s not to be taken for granted.