If you prefer this in video form, I’ve created a screencast that shows the steps to get verified on Mastodon:
When you look at someone’s profile on Mastodon, you might see that they have a green check mark next to their links:

That means Mastodon has confirmed that the link is controlled by the person who runs that Mastodon account. Mastodon does that by looking for a special link on the site that says “yes, this Mastodon account really is me.”
The way this works is that Mastodon will go to URLs in your Mastodon profile and look for links to your Mastodon URL with a special HTML attribute: rel="me"
. The Block Editor for WordPress just added a feature to make it easy, no HTML required.
Here’s how:
The first step is to be sure that you are running an up-to-date version of the Gutenberg editor. I’m writing this in late 2022 and so you’ll need to have the Gutenberg plugin installed and at least version 14.5. This will also be in the next version of WordPress, 6.2, which will be out in early 2023.
You need to add a Social Icons block to your site if you don’t have one already. Mine looks like this in the footer of my site:

If you use a block theme you’ll have the site editor available in wp-admin under Appearance→Editor. You can open that, scroll down to your footer, and insert Social Icons. It will start off empty, so you’ll have to use the block inserter (the big old + button) to add a Mastodon block to it. Then click on the Mastodon icon and put in the https URL.
If you use a classic theme, you can still add the Social Icons block as a widget.
The last thing you need to do on WordPress is, with the Mastodon icon selected, go to the settings sidebar on the right, click the Advanced drop-down and put the word “me” in the box for “rel”:

Now WordPress is saying that you are the same person as on Mastodon.
The last step is to log into Mastodon, choose Edit Profile, then add your WordPress URL into the Profile Metadata section, then save your changes. If you already had your URL in there, you should still press the save changes button because that tells Mastodon to check your WordPress site again.
Update 2020-11-15: If your website is using a classic theme or an older version of Gutenberg, you can follow these directions to add a verification link to a menu.
4 responses to “How to verify your WordPress site on Mastodon”
[…] George Hotelling, WordPress core contributor, wrote a short tutorial on How to verify your WordPress site on Mastodon. […]