Setting up WebFinger

December 23, 2022

I set up a Mastodon account over a month ago and have been enjoying my time there. It’s niche, it’s small, and it feels more like the olden days of Twitter — back when social media was less about “engagement”. It’s possible that Mastodon will eventually suffer from the same issues that sucked the joy from Twitter, but its been fun to explore so far.

One piece I find fascinating is the underlying ActivityPub protocol that powers the “Fediverse”. John Voorhees recently wrote an excellent article about the promise of ActivityPub which inspired me to play around more with the protocol.

As a first step, I decided to set up WebFinger on my domain. This is a Fediverse take on the old Unix finger protocol that allowed people to share information about themselves on computer networks. With WebFinger, users on a domain can publish information about where they exist in the Fediverse. This can help others to find people using their domain/email address, and also to verify that someone is who they claim to be.

I host this site using GitHub Pages. It’s a great service, but can be limiting at times. Happily, it was quite easy to get working! I used this guide to set it up statically, but there are some Jekyll-specific hooks I may use later. Now that it’s working, people can search for me via my domain or email address and find me on Mastodon.

More specifically, I added a /.well-known/webfinger file to my Jekyll project. I then added the following line to my _config.yml:

include: [".well-known"]

That prevents GitHub Pages from ignoring the .well-known directory. I then added my content to the webfinger file. You can see the contents here on GitHub.