9

I am attempting to add a couple sub domains to a production server. Lets say the server is 2K8 and the domain is www.mysite.com. I would like to add SD1.mysite.com and SD2.mysite.com. Since this is a production server, I do not have the luxury of trial and error - I can't afford to bring the domain down while I learn how to create a subdomain. Another luxury I don't have is DNS skills.

My question is: What type of record do I add to my domain to create a local subdomain on a localhost site with port 81?

In Windows Server DNS manager I see the following:

DNS Overview

This expanded node is the site I want to add sub domains to. When my right click to add a subdomain record, I see these options:

enter image description here

At this point I dont know if I create another domain, an alias, a cname, a host, a delegation, or just lie down defeated in the corner in the fetal position clutching my knees while rocking back and forth and crying.

Thank you

nocarrier
  • 195
  • 1
  • 1
  • 6

2 Answers2

5

All you do is click "New Host (A or AAAA)..." and for the Name, type somehost.subdomain. "Subdomain" will automatically be added as a subdomain, and a host record named "somehost" will be created in that subdomain. Very simple.

It's good that you're careful around production servers, but consider getting yourself a little lab environment together, even if it only consists of VMs on your laptop, it will pay for itself many times over.

Ryan Ries
  • 55,481
  • 10
  • 142
  • 199
  • + 1 for the lab environment suggestion - with the ease of VMs these days there is really no excuse. Thanks! – nocarrier Aug 11 '14 at 16:26
  • +1 very clear and solid explanation. – Saber Amani Mar 23 '15 at 19:42
  • Just tried this, and it worked like a charm! :) My issue was due to the local domain matching the same address and the www site. Had to do www.subdomain in the Name field to get it to work! – NBN-Alex May 01 '17 at 20:47
5

If you want to add a subdomain then you would select the New Domain item from the context menu and name it accordingly. Subsequent records created in the subdomain will end up as hostX.SD1.mysite.com.

If you simply want to create a DNS record for SD1 in the mysite.com domain/zone then you would select the New Host (A or AAAA) item in the context menu and edit it accordingly. This will create an A record for SD1 in the mysite.com domain/zone resulting in an A record of SD1.mysite.com.

joeqwerty
  • 109,901
  • 6
  • 81
  • 172
  • Would both the New Domain and DNS Record methods produce the same result, or is one preferable over the other? – nocarrier Aug 11 '14 at 20:27
  • No they wouldn't. One is a subdomain/zone which will hold DNS records. All records in the subdomain/zone would be `DNSrecord.SD1.mysite.com`. The other would be a host (A) record in the existing zone, which would be `SD1.mysite.com`. – joeqwerty Aug 11 '14 at 20:31
  • Awesome- Thank you! One last question. I added the record and it works, but only if I append the port: IE SD1.MySite.com:8881 works but SD1.MySite.com does not. The AAAA HOST record does not allow ports, only IPAddress. Any idea how I can take the port out of the mix? Port 80 is already taken... maybe I can't use ports at all? – nocarrier Aug 11 '14 at 20:37
  • 1
    You can't use DNS to designate the port (you actually could with an SRV record but web browsers don't support SRV records). So, you'll need to include the port when connecting or you need to set up host headers in the web server for that site. – joeqwerty Aug 11 '14 at 21:20
  • I can't thank you enough! Your top notch op skills are most appreciated. – nocarrier Aug 11 '14 at 21:32
  • Glad to help... – joeqwerty Aug 11 '14 at 21:32