Last active
November 19, 2022 20:03
-
-
Save jed/bee2931a3a3e0c548833210211bd4efa to your computer and use it in GitHub Desktop.
Revisions
-
jed revised this gist
Nov 19, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ # Making your Mastodon account discoverable from your own domain, using Cloudflare page rules Are you (1) moving to Mastodon, but (2) want to use your own Cloudflare-hosted domain for discoverability, and (3) don't want the hassle of managing your own instance? -
jed created this gist
Nov 19, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,24 @@ # Making your Mastodon account discoverable from your domain, using Cloudflare page rules Are you (1) moving to Mastodon, but (2) want to use your own Cloudflare-hosted domain for discoverability, and (3) don't want the hassle of managing your own instance? Well, here's a quick way to make sure that folks can find you when they search Mastodon with your domain. The UX is like this: <img width="600" alt="image" src="https://user-images.githubusercontent.com/4433/202832255-aaac7bbf-1747-4fa7-8acf-4d593487db7f.png"> (If you're not on Cloudflare or would rather just host a file, use [Maarten Balliauw](https://mastodon.online/@maartenballiauw)'s post, [How to discover Mastodon account via custom domain](https://blog.maartenballiauw.be/post/2022/11/05/mastodon-own-donain-without-hosting-server.html), from which this technique was inspired.) ## Steps 1. Go to the Cloudflare dashboard at https://dash.cloudflare.com, then 2. click on the domain you want to use, then 3. click __Rules__ in the left sidebar, then 4. click __Create Page Rule__, then 5. for the URL, enter `{domain-name}/.well-known/webfinger*` (for me it's `jed.is/.well-known/webfinger*`), then 6. for the setting, choose __Forwarding URL__, then 7. for the status code, choose __302 - Temporary Redirect__, then 8. for the destination URL, enter `https://{mastodon-domain}/.well-known/webfinger?resource=acct:{username}@{mastodon-domain}` (for me it's https://mastodon.social/.well-known/webfinger?resource=acct:jed@mastodon.social). Once you're done the screen should like like this, at which point you click __Save and Deploy Page Rule__ to make it official. <img width="600" alt="image" src="https://user-images.githubusercontent.com/4433/202832346-c14411f6-0b74-4948-a769-b5b8c4698601.png">