Usernames without subdomain

I would like to have mastodon hosted on a subdomain but have usernames without the subdomain.

As mentioned in this post here there used to be a guide on Github here

Could someone please point me to the current documentation for this? I haven’t been able to find it.

Additional questions:

#1: If I want to have multiple ActivityPub networks with usernames on the TLD but hosted on subdomains, would this work?

Example: Can Peertube, Pixelfed, Mastodon etc be hosted on subdomains without having the subdomain in the respective username?

#2: Basically the same question for non ActivityPub networks.
Should it be possible to have networks like Matrix, Diaspora, Hubzilla etc hosted the same way next to Mastodon. (hosted on subdomain but with only TLD in the username?)

#3: Can these edits be done to an existing live Mastodon instance, or does this need to be done prior to launch?

Thank you for any answers :slight_smile:

I have such a setup. All I had to do was place a file with the following contents under .well-known/host-meta of my main domain:

<?xml version="1.0"?>
<XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0">
    <Link rel="lrdd" type="application/xrd+xml" template="https://subdomain.main-domain/.well-known/webfinger?resource={uri}"/>
</XRD>

Where subdomain.main-domain is the domain I use for mastodon.

I can’t tell you whether it’s supported to change this config after install, though…

I’m not sure how other decentralized services handle this as I don’t use any of the ones you mentioned. If they do use a mechanism for this and they don’t use the same one, then it should probably work but you’d need to consult those guides.

1 Like

Awesome @raphi Thank you for this!

Just for future readers I will add the note according to the post I mentioned

in .env.production there should be

LOCAL_DOMAIN=maindomain
WEB_DOMAIN=subdomain.maindomain

I will try this out today :slight_smile:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.