Promote a secondary domain?

Is it possible to “promote” a secondary domain (sub server) to be the primary (top level)? Here is the case:
The customer originally had domain A with their web and email accounts. After a few years the got domain B and C which were set as secondary domains under A. Now A will disappear and I need to have B as the primary domain and C as a secondary under B but we need to maintain all accounts that were on A.

Is there a procedure to do this from Virtualmin or will I have to delete everything and start from scratch?

You mean B and C were subdomains (sub servers) of domain A (Server)… What exactly is “Promote”?..

However, if it’s hostname you’d like to change, simply go to Webmin, Networking Option, Network Config…

Yes, Virtualmin does offer a way to convert a sub server to a parent server / top level server via Server Configuration -> Move Virtual Server.

I checked that option out but it will only allow me to move the sub server to another top level domain. What I need is for the sub server to inherit all the user accounts from the top level domain and become a top level domain.

At this moment users from that domain log in as user.A for their mail. I need to change the login to user.B

It is not a hostname change. Here is the structure right now:
A

  • B
  • C

All user email accounts only exist in the top level A domain. B and C are sub servers (aliases) of the top level domain. Domain A will disappear soon and we need B to become the top level domain so that users log in as user.B instead of user.A.

If I erase the B and C alias sub servers can I rename the top level domain to B to retain all users info?

Let me get this straight. If B and C are sub servers (subdomains), as soon as you delete A, B and C will delete as well… Now, I may be wrong, because I’ve never done this in this panel.

Actually, I think it could be done. Is there a reason why you need to remove A? You can simply make B your primary, but if you’re removing A, most likely it’d have to be deleted from the server, and if B anc C are tied up to A, they will also disappear…

The company changed name so the A domain will no longer be renewed after next month. B is now the official name and C is a variation of the official name. That is why A need to disappear.

Right now B and C are aliases to A so they do not have any users or web pages. My current plan is to delete B and C as aliases and then try to rename A to B so we can retain user accounts and the web page. If that goes well I can then put C as an alias of B.

You need to do this:

  1. Promote the sub servers domain B and C to top-level servers
  2. Create users / email accounts on the promoted domain B identical to the users in Domain A
  3. Use imapsync or a paid service like https://www.calport.com/Email-Account-Migration to move the email from domain A to domain B

Could you post the domain?..ex. Domain.com and b.domain.com, c.domain.com.

No.

Select Convert to parent, and it will…convert the sub-server to a parent (non-sub-server) virtual server.

1 Like

Yes, converting will work if B is a totally different domain than A… or keep A to hold the subs…

That doesn’t matter (though it sounds like B is a different domain than A, based on OP’s description of the situation). If you convert to a parent and they currently share a DNS zone, it will split it into two zones, giving B its own DNS zone.

I say this all the time, but I’ll say it again, because nobody ever believes me (lots of folks have been trained to think weirdly/wrongly about “subdomains” by the way cPanel handles them): Names don’t matter to Virtualmin. A subdomain name is not magic. It’s just another name. It can have its own DNS zone. It can be its own virtual server (i.e. joe.virtualmin.com does not need to be a sub-server of virtualmin.com). Sub-servers are about ownership, not about names.

At the end I simply deleted the domains that were aliases to the main domain and renamed the main domain to one of the secondary. That way all accounts were converted to the new domain. After that I just added the other domain as an alias. Quite painless and fast.

Thanks.

1 Like

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