question about www alias and other website aliases for a domain

Question.

  1. When setting up a new domain in VM, where is it specified that www is automatically a default alias for the domain website? Can this be removed after the domain is created?

  2. Similar to #1 above, once a domain is already created, how can a new alias be added just for the website so the website responds to (for example) beta.domain.com

Thanks

Status: 
Active

Comments

Both of these can be configured for new domains at System Settings -> Server Templates -> Default Settings -> BIND DNS Domain.

For 1 you can uncheck the www.domain box.

For 2 you can add a line to the "BIND DNS records for new domains" box like :

beta  IN   A  ${IP}

Howdy -- the automatic aliases are configured in System Settings -> Server Templates -> Default -> BIND DNS Domain -- you can set which ones are created automatically in "Address records for new domains".

You can add new aliases to existing domains by going into Create Virtual Server, and choose "Alias of NNN" at the top.

There isn't a simple way to remove the automatic aliases such as 'www' once they're created.

The easiest way would probably be to go into Server Configuration -> Edit DNS Records, and remove the 'www' entry from there -- and then to edit your Apache config, and remove the 'www' ServerAlias line.

Yeah, but what if we are not using the local DNS server for the domain. Assume we are using an external DNS Server for all DNS requests for the domain, and "DNS domain enabled" is unchecked.

In that case, you would need to manually add the DNS records at your external DNS Server.

The correct entries would still be added into your Apache config, you would just need to manually setup the DNS for them.

So let's say we have a domain abc.com that has been set up with the default template. And we are NOT using the local DNS server, but instead using an external DNS for this domain.

By default, the website responds to requests on abc.com and www.abc.com as per the default template.

If we simply wanted to add beta.abc,com we could just add the alias beta using the control panel and now the website would server requests for beta.abc.com?

By default, the website responds to requests on abc.com and www.abc.com as per the default template.

Yup!

If we simply wanted to add beta.abc,com we could just add the alias beta using the control panel and now the website would server requests for beta.abc.com?

In Virtualmin, you would need to add the alias using Create Virtual Server. You'd then need to setup the DNS for that alias using your external DNS server.

But, those two steps are all you'd need to do for that to work.