Verify Github profile link on Mastodon
Looking to get a fancy verified checkmark on Mastodon for your Github account?
This post details how I made this work.
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
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:
- Added a new page
- Included the Mastodon verification tag:
<link href="https://androiddev.social/@jeroenmols" rel="me">
- Have the page redirect to my Github profile
- Use the domain
jeroenmols.github.io/githubon 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:
If this was helpful to you, consider buying me a coffee or thanking me on Mastodon or Twitter!
Leave a Comment