Inspired by this article by Maarten Balliauw, this Cloudflare Worker code enables a proxy for Mastodon metadata under your own domain, with a memorable alias.
This allows people to search for you under your own @user@domain
alias, finding your account on whichever server it currently resides on. This has a lot of advantages when it comes to discoverability!
If you move servers, you can update the mastodonHandle
value to reflect that; searching for the alias will then direct people to your account on the new server.
Example: search @me@markb.uk
on your Mastodon server and you should find my account—if the search isn't currently broken because it's too busy. 😉