Creating subdomains and A records to servers in Windows Server DNS
First, you need to make a forward lookup zone for domain.com
I then recommend you decide which will the root domain server for domain.com, so when someone types in domain.com without the www. they still get taken to a server. You can either add on A record for one server, or both servers and they will take turns serving requests.
Right click on Forward Lookup Zones and select New Zone..., Primary Zone, Select which servers you would like the zone to be on, I normally do not need to change this, Allow only secure dynamic updates (recommended), Finish.
Then right click on your shiny new FLUZ domain.com and select New Host (A or AAAA)...
Name (Leave blank for root A record, and the IP address of the server(s) you want to use, this should leave you with (if you decide to make both the root):
(same as parent folder) Host(A) 192.168.1.1
(same as parent folder) Host(A) 192.168.1.2
Then you want to add more A records for the required subdomains, so for example
www4.h2.domain.com -> 192.168.1.2
This will have a 'name' in the New Record form of www4.h2
This will create a folder under domain.com called h2, within h2 you will find the record:
www4 Host(A) 192.168.1.2
When your finished you should have two records in the h2 folder, www and www4, and two records in the domain.com folder www and www4
You dont have to add the root A records, Im just OCD
Vitusq
Updated on June 14, 2022Comments
-
Vitusq almost 2 years
We have a site hosted internally on the IIS of 2 different Server (192.168.1.1 & 192.168.1.2) Windows 2012 R2 by the name domain.com
1)What is needed that an entry should be made in DNS such that the developers are able to create a sub-site such as h1.domain.com or h2.domain.com or h3.domain.com
2)If a request is made for www it should be redirected to 192.168.1.1
3)If a request is made for www4 it should be redirected to 192.168.1.2
so by point 2 & 3, what i need is:
www.domain.com -> 192.168.1.1 www.h2.domain.com -> 192.168.1.1 www4.domain.com -> 192.168.1.2 www4.h2.domain.com -> 192.168.1.2
So what enteries should i make in the DNS server for this to work ?