Submitted by Alain Cox on Sat, 03/30/2013 - 09:19
Is it a good or bad idea to create the subdomain www like a sub-server? I read about the decison the makers from Virtualmin made a few years ago concerning subdomains versus sub-servers. A decision they still regret.
Status:
Active
Comments
Submitted by andreychek on Sat, 03/30/2013 - 09:33 Comment #1
Howdy -- when you create a Virtual Server named "domain.tld", Virtualmin actually creates an alias server named "www.domain.tld" along with that.
That alias is setup within the Apache configuration, as well as in the BIND DNS zone.
So long as that alias is configured, you wouldn't be able to make a Sub-Server with the same name.
Unfortunately, there isn't a simple way to remove that once it's created, as it's assumed that most folks would want both domain.tld and www.domain.tld to point to the same website.
However, if you wanted a different website for domain.tld and www.domain.tld, you could manually remove the 'www' DNS record, and remove the www.domain.tld ServerAlias from the Apache config.
Once you do that, you could setup a Sub-Server named www.domain.tld if you wanted (though, in our opinion, most users would typically expect domain.tld and www.domain.tld to refer to the same site).