Domain Changes and Aliases

What’s the actual effect of the ALTERNATE_DOMAINS list with an instance? Does is simply give you an alternative access URL while everything is still run on the LOCAL_DOMAIN internally? Or does it have any kind of deep interaction where you can add @user@alternate.domain from other instances and have it treated identically to the original?

The scenario is that the .org variant of my main domain became available recently and I grabbed it. I’d ideally like to migrate everything over so that’s the primary reference point for everything. My old domain will never be unavailable though.

Currently I’ve added the .org as an alternate domain and it’s working as expected, available via the new URL but still referring to everything as the old domain in links etc. However, if at this point I were to swap the local and alternate domains in the config, what should happen?

1 Like

Same question, what are the possibilities and implications of changing domains?

Another example. Imagine that someone creates After reaching 10.000 users, they decided to have their own domain Can they just rename expecting that everything will work fine after some cache refreshing in the Fediverse?

I don’t think so, because users will be remembered on other fediverse servers as

I know there is an open issue that was marked as “Requires In Depth” about the same question you are asking:

So, I believe nobody has fully tested this but would say that currently changing the domain will partially break the federation.

When I think about this and from my very limited knowledge on the code behind Mastodon, I can see that a bunch of stuff on the database relies on URLs and I am not aware of a process that looks for changes on those URLs and updates it in case it finds changes. Eg: the accounts table:

Given that the is a core identity of the user, a renamed instance would be treated like a new instance by others, with some things working like before.

What else there is? how do I know that is ?

Well, my thinking would be that when a get to the user returned 404, Mastodon would look for the webfinger and see if it responded. In case it did, it would update all database URLs references to that user (and ideally all other users from that instance).

In that case, should still be able to respond with webfinger. Yes. maybe webfinger is some way to introduce “redirects” to the protocol.

Obviously this could lead to all sort of troubles and would require major reworking because some instances may still “see” the “old” user and when references to the “new” user show up then it needs to deal with confirming the new domain is an authority for the “old” user and do the same URL database update. It would be messy to implement this (at least in my mind).

Also, if someone would change and then change again everything would break apart if not all instances had yet done the first change.

The usage of LOCAL_DOMAIN and WEB_DOMAIN was never intended for changing an instance domain and I think it should not be used for that.

1 Like

What would happen to the “follows” / “followed by” relationships?

If User A’s instance renames suddenly, would this user still be able to follow and be followed by the same users?

@icaria36 in short, no, this cannot be quickly moved.

1 Like