Verify your WordPress website on Mastodon | David Artiss

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.


This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters

function add_mastodon_verification() {
?>
<link rel=”mehref=”[your Mastodon profile link]>
<?php
}
add_action( ‘wp_head’, ‘add_mastodon_verification’ );
view raw

functions.php

hosted with ❤ by GitHub

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…

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.

Whichever of the above methods you used, you’ll now need to do the following to add your site to Mastodon…

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.

Share this:

This content was originally published here.