Sign-in to your Mastodon instance. Search for @firstname.lastname@example.org. What result do you get?*
Double the fun. Search for @email@example.com, another alias of mine. What result do you get?*
Say you want to explore different servers, switching instances as you see fit. Today, it’s Mastodon.Social. Tomorrow, it’s Something.Else.
You have your own website https://your.domain. You’re thinking, “I’ll scrape the web for all the places where my @mastodon.social handle appears. I’ll change @firstname.lastname@example.org to @email@example.com.”
You could have had a V-8. You could have used your domain as your permanent, #portable, #interoperable (?) mastodon handle, even though you haven’t set up your own personal Mastodon server.
You can add an endpoint to https://your.domain/.well-known/webfinger that points to your latest Mastodon instance. Follow this guide by @firstname.lastname@example.org Your mileage may vary.
My experience was pretty much problem free. I reworked the #Sveltekit code for a couple of domains that I host on a Linux Ubuntu server on Google Cloud Platform. I came across a github issue that offered different ideas. The one that worked for me was the simplest. I added a dot folder under static/ and then created a blank file named ‘webfinger’ and then I put the json output of the GET command in the blank file. That was on my local development machine.
Here’s how I get the json:
$ curl https://mastodon.mexicanbold.com/.well-known/webfinger?resource=acct:email@example.com | python3 -mjson.tool
That outputs the following:
Copy and paste into the blank webfinger file (static/.well-known/webfinger). There’s nothing else in that file. I tried adding the output from a second account thinking I could add the json from an indefinite number of accounts, but if that’s even possible it didn’t work for me.
My process for updating a #Sveltekit web site is manual and somewhat tedious but not terribly laborious. Yes, it is toil and I should automate it. Most of my commands are in history and so I usually just use control-r in bash and find the right command. In svelte.config.js I use adapter-node. I self-host on Google Cloud Platform and use Nginx with upstream directives serving each site on a different port. I run PM2 process manager. I should do a post on my tedious-not-too-laborious-toil-nonetheless #sveltekit deployment process.
Once deployed, visit it and add .well-known/webfinger to your path and you should see some output. In Mastodon, search for your account using your new alias. Now give your alias to any prospective mastodon user (any activitypub user?). Someone who searches for you in the Mastodon using @firstname.lastname@example.org should get a result that matches the instance name that you’ve put in the webfinger file. When you change instances, simply rerun the curl command and swap the output and re-build and re-deploy.
So Mastodon UP! Roam wide and far, high and low, from now until … we go extinct.
* both times the result should be the same: @email@example.com The reason is that I put the same webfinger file in the .well-known folder for each of my domains, happyhobbit.dev/.well-known/webfinger and antoine.patraldo.com/.well-known/webfinger.