If you’re using Mastodon, then it’s possible to verify your website links in your profile. When done, you’ll see something like this…

The green background and tick shows it’s been verified as belonging to you.
Here’s how you do it..
Adding a link to your page header
This is the most complex way to do it, but is the cleanest.
- Add the following code to your
functions.php
file, which is in your theme folder
- Replace the bit in brackets (inc. the brackets) with a link to your Mastodon profile.
The only problem with this method is that if your theme gets an update, it’s likely the file will get reset back again.
In addition, if you’re using WordPress.com then you may not be able to edit this file anyway. In both cases, another solution is to use a plugin that can insert just the line of code into the header that you need. The line in question is the 3rd one…
<link rel="me" href="[your Mastodon profile link]">
The plugin I’m using for artiss.me, which is on WordPress.com, is WPCode, but there are many other alternatives available.
Add a link to your home page
This is the simple method. Indeed, it will work on any website, not just WordPress.
- Somewhere on your home page, add a link to your Mastodon profile. However, you’ll need to change the code by adding
rel="me"
to the anchor. It should end up looking something like this…
<a rel="me" href="[your Mastodon profile link]">My Mastodon profile</a>
- As with the previous method, you just need to replace the bit in brackets (inc. the brackets) with a link to your Mastodon profile.
Whichever of the above methods you used, you’ll now need to do the following to add your site to Mastodon…
- Go to Mastodon and click on “Edit Profile”
- Under Profile Metadata add a link to your website
And that’s it. Give it a while for your Mastodon server to recognise the link but when that’s done, expect to see that lovely green, verified confirmation.
For both this site and artiss.me, I’ve used both methods (because a bit of overkill would never do any harm, right?), so feel free to check out the source code to see what the final result looks like.
Talk to me!