Skip to main content

Verify Github profile link on Mastodon

·2 mins
Mastodon Github Tips
Table of Contents

Looking to get a fancy verified checkmark on Mastodon for your Github account?

This post details how I made this work.

Steps
#

Before I get started, huge thanks to Simon Wilson for inspiring me with the original idea.

In his excellent post Simon details how to leverage the your-username.github.io static webpage to prove Github domain ownership.

The idea is that proving I own jeroenmols.github.io is equivalent to proving ownership of github.com/jeroenmols.

However, I can’t simply redirect jeroenmols.github.io to my Github profile as I already host my my personal website on that domain. (I use a CNAME record to make both domains equivalent).

Consequently, Simon’s approach didn’t work for me. Now what?

Well instead of redirecting the entire domain, I decided to redirect a sub-page. To do this, I:

  1. Added a new page https://jeroenmols.com/github
  2. Included the Mastodon verification tag: <link href="https://androiddev.social/@jeroenmols" rel="me">
  3. Have the page redirect to my Github profile
  4. Use the domain jeroenmols.github.io/github on my Mastodon profile

The webpage content looks like this:

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <title>Redirecting to github.com/jeroenmols /</title>
    <meta http-equiv="refresh" content="0; URL=https://github.com/jeroenmols">
    <link href="https://github.com/jeroenmols" rel="me">
    <link href="https://jeroenmols.com" rel="me">
    <link href="https://androiddev.social/@jeroenmols" rel="me">
  </head>
  <body />
</html>

And my Mastodon profile, now looks like this:

Mastondon profile

That’s it!

If this was helpful to you, consider buying me a coffee or thanking me on Mastodon or Twitter!

Jeroen Mols
Author
Jeroen Mols
Jeroen Mols is a Google Developer Expert (GDE) in Android, the former lead Android developer at Philips Hue and an internationally recognized speaker. He is currently pushing his boundaries as a full stack developer at Plaid.