301 redirect on mastodon for a cleaner looking @

So I made a mistake with my first instance. The @'s are not super clean right now usernames look like @name@mastodon.domain.com. I asked around and read the docs and I guess mastodon is bad at figuring out if the same server has switched domains or redirects.

So im spinning up a new instance to migrate to. But I’m running into the same issue. I have a subdomain “mastodon.domain.com” on the new domain where the A record is pointing at my VPS. Id like the usernames to show up as @name@domain.com and not the subdomain.

Im confused on a few points.

  1. The main domain is in use as a blog. the docs say that the server that is hosting the main domain needs to have the 301 point to the subdomain. wont that mess up traffic to the main domain? or is that all done on the VPS side and not my web host.

  2. I know that LOCAL_DOMAIN needs to be “domain. com” and WEB_DOMAIN needs to be mastodon.domain .com but what URL is used in setup for “server name” and what conf file would I put the redirect if its done on the VPS side? my guess is in the “available sites” but I obviously did that wrong because now Nginx wont start

I really hope this makes sense. typing my issues is not my strong suit. Thanks in advance.

As outlined in Configuring your environment - Mastodon documentation domain.com needs to redirect or proxy webfinger queries to mastodon.domain.com. You would not redirect the whole of domain.com but just https://domain.com/.well-known/webfinger. The example configuration snippet is for the server serving domain.com, not mastodon.domain.com.

I am not sure what you mean by “what URL is used in setup for “server name””?

1 Like

When your running the initial set up you get asked for a domain name. I was wondering if that was “domain. com” or “mastodon.domain .com”

That would be domain.com, but in any case, you’d have to modify the config file between generating the file with mastodon:setup and actually running your instance, as mastodon:setup does not account for the case where WEB_DOMAIN is different from LOCAL_DOMAIN.

1 Like

I appreciate the clarification. Thank you. im not as brain dead today lets see if i can get this new instance spun up.

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