Вопрос

I have a static webpage, example.com, that is working fine and hosted on AWS S3 with Route53 connecting the A and NS record sets to my GoDaddy DNS.

I want to create sub.example.com that points to a dynamical page that will be hosted on my EC2 instance. I have my EC2 associated with an Elastic IP, whose public address is 12.12.12.12. I set up Route53 by creating a separate hosted zone for sub.example.com with 3 record sets:

  • An A record set named sub.example.com with the value 12.12.12.12.
  • An NS record set with values NS-1.org, NS-2.org,NS-3.org, and NS-4.org.
  • AWS seems to have generated an SOA record set, with values ns-1.org. awsdns-hostmaster.amazon.com. 1 0002 003 0000004 00005

All record sets are named sub.example.com. In my GoDaddy account, under DNS Zone File, I added the following:

  • A record set - name sub pointing to 12.12.12.12
  • 4 NS records - name sub pointing to NS-1.org, NS-2.org,NS-3.org, and NS-4.org.

Am I missing something? My server is not running yet, I just want to verify that my DNS settings are ready first.

While dig example.com NS works, I tested sub.example.com with command dig sub.example.com NS and it failed:

[lucas@lucas-ThinkPad-W520]/home/lucas$ dig sub.example.com NS

; <<>> DiG 9.9.5-3-Ubuntu <<>> sub.example.com NS
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 44939
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1280
;; QUESTION SECTION:
;sub.example.com.       IN  NS

;; AUTHORITY SECTION:
example.com.        900 IN  SOA ns-5.net. awsdns-hostmaster.amazon.com. 1 0002 003 0000004 00005

;; Query time: 79 msec
;; SERVER: 127.0.1.1#53(127.0.1.1)
;; WHEN: Thu May 15 13:07:40 PDT 2014
;; MSG SIZE  rcvd: 128

Interestingly, in the AUTHORITY SECTION, the SOA points to ns-5.net, which is under my NS set for the example.com hosted zone, NOT my sub.example.com zone. Any suggestions?

I also queried WHOIS for sub.example.com:

Domain Name: EXAMPLE.COM
Registrar: GODADDY.COM, LLC
Whois Server: whois.godaddy.com
Referral URL: http://registrar.godaddy.com
Name Server: NS-5.ORG
Name Server: NS-6.ORG
Name Server: NS-7.ORG
Name Server: NS-8.ORG
Status: clientDeleteProhibited
Status: clientRenewProhibited
Status: clientTransferProhibited
Status: clientUpdateProhibited
Updated Date: 30-jun-2014
Creation Date: 30-jun-2013
Expiration Date: 30-jun-2015

It indicates that my NS records are pointing to the name servers for example.com and not sub.example.com.

Am I missing something, or am I doing too much?

Это было полезно?

Решение

You do not need NS records for sub.example.com. You only need NS records for your domain, example.com. The A record is enough for sub.example.com.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top