I am new to AD and Windows Server in general, but from what I've seen on youtube, companies can have something like this:
www.example.com
www.eng.example.com
I figured this meant that there is a web server in the example.com domain named www, and there is a different web server in the eng.example.com domain also named www. This would imply that you can use a duplicate computer name on a parent domain and its subdomain. When I try to do this in practice however, I get this error when trying to promote the second Windows Server 2012 machine to a DC:
A domain controller with the specified name already exists
Does this mean that in the above case, www does not refer to a specific machine, but rather the company uses DNS to alias www.example.com to say webserver1.example.com and www.eng.example.com to say webserver2.eng.example.com?
Best Answer
If I understand your question correctly, then the answer is that yes, you would typically use DNS to "alias" different hostnames to the same computer, which might have a different name entirely.
To take you example - assuming it's two different web servers, you wouldn't need to give either of them the computer name
www
, even though that's the beginning of the URL users would use to access the sites. Assuming your AD domain isexample.com
, and you name your web serversweb01
andweb02
, their fully qualified names would beweb01.example.com.
andweb02.example.com.
.One way of setting up your example could be:
www.example.com
is an alias (CNAME
) in DNS forweb01.example.com
www.eng.example.com
is an alias (CNAME
) in DNS forweb02.example.com
You might even have both sites hosted on the same server and use host headers to allow the HTTP server to serve a different site depending on the DNS name used to access the site. In that case DNS might look like this:
www.example.com
is an alias (CNAME
) forweb01.example.com
www.eng.example.com
is also an alias (CNAME
) forweb01.example.com
EDIT
As your question mentions AD, I've assumed your question relates to internal sites such as an intranet. Although I've used "example.com" in the example to keep things simple, in the real world you should typically be choosing a domain name for your internal DNS that won't conflict with an internet DNS domain. See Microsoft's recommendations.