What are NS records?¶
An NS record allows you to specify a different nameserver for a subdomain.
When would I use an NS record?¶
You can use an NS record anytime you need to set a different nameserver for a subdomain. This can be useful if you want to point a particular subdomain to an internal nameserver for testing purposes, for example.
Do not use the NS record for the bare domain. This will send all DNS queries to this second domain name server. Any other records you create in the Gandi system will be ignored, which can lead to errors or confusion as you manage your domain. If you want your domain to use a different nameserver it is better to set the nameserver as your external nameserver in your account.
Can I have an example?¶
In this example we will point our subdomain dev.example.com to an internal nameserver. This will be done in two steps.
First, since an NS record can only point to a domain and never to an IP address, you must first create an A record that points a subdomain to the IP address of your internal nameserver.
In this example, we will use the subdomain nameserver.example.com.
nameserver 1800 IN A 126.96.36.199
Now that this subdomain is in place we can create the NS record for dev.example.com.
dev 1800 IN NS nameserver.example.com.
The subdomain dev.example.com will now use the internal namserver.