For subdomains should I use a CNAME or NS record? My registrar and hosting providers are different
Asked
Active
Viewed 397 times
1
-
Usually neither. – kasperd Feb 17 '19 at 12:50
-
Are you trying to delegate the subdomain or point a domain name to a server? If you have the IP address for web hosting, use A or AAAA. CNAME would make it an alias name. NS would point to a different name server that would be authoritative for that subdomain. Other records may also work for you, depending on your need. – melds May 26 '22 at 21:29
1 Answers
2
NS records are only used to define the DNS authority (owner) used by your site. As a general rule you don't need to be making any changes to these records if you are asking this question.
You need to open your registrar's DNS control panel, and add / edit an 'A' record pointing to the IP from your hosting provider. If you are adding subdomains on the same IP address you should use cnames to define aliases.
For the sake of clarify, CNAME records point to A or other CNAME records, and are used for defining subdomains. [source]
Tim Brigham
- 15,465
- 7
- 72
- 113
-
"used to define the DNS name resolver used by your site". This is an invalid statement. NS records define the authorative name servers for the domain's name server records. – Tero Kilkanen Feb 16 '19 at 08:59
-
@Tero yeah, I understand that. I oversimplified a bit but it's not core to the question. – Tim Brigham Feb 16 '19 at 19:31
-
2Simplifying is OK, but when the simplified information is wrong, it is bad. Even though it is not in the core of the question, this wrong information might still stick to the reader, which then causes issues later on. – Tero Kilkanen Feb 16 '19 at 21:50