How to Change Default Name Servers (NS) on VergeCloud for Your Website

Changing Default Name Servers (NS) on VergeCloud: Step-by-Step Guide

Change Default NS

A Name Server (NS) Record is a type of DNS record that indicates which DNS server is authoritative for a specific domain. It directs DNS queries to the correct server, where other records like A, MX, or CNAME are stored. For example, an NS record for example.com might point to ns1.vergecloud.com and ns2.vergecloud.com, which handle all DNS requests for example.com.

VergeCloud provides new NS (Name Server) addresses for domains using DNS and CDN services. If you encounter issues with the compatibility of specific NS addresses, you may want to switch to alternative NSs with different TLDs for better compatibility or to meet specific domain registrar requirements. In such cases, you can change the default NSs to those with "net" and "com" TLDs by following these steps.

Changing NS via Dashboard

To change your default NSs to VergeCloud’s "net" and "com" TLDs, log in to your VergeCloud CDN panel, navigate to your domain’s dashboard, and locate the settings to modify the NS records.

Change Default NS Panel

After locating the settings, replace the new NSs that are displayed in the domain registrar panel.

Replace NSs

Changing NS via API

You can also change your default NSs using the VergeCloud API. Here’s an example request to switch to the optional NS keys:

  1. curl --location --request POST 'https://api.vergecloud.com/domains/example.com/ns-keys/use-optional-keys' \ --header 'Authorization: Bearer API_KEY' \ --header 'Content-Type: application/x-www-form-urlencoded'

Testing

After changing the NSs, use the dig command to confirm that the NS records are updated:

  1. dig NS example.com

Sample Test Output

  1. ; <<>> DiG 9.16.1-Ubuntu <<>> NS example.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 87654 ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 1, ADDITIONAL: 1 ;; QUESTION SECTION: ;example.com. IN NS ;; ANSWER SECTION: example.com. 86400 IN NS ns1.vergecloud.com. example.com. 86400 IN NS ns2.vergecloud.com. ;; Query time: 52 msec ;; SERVER: 8.8.8.8#53(8.8.8.8) ;; WHEN: Thu Sep 26 13:15:30 UTC 2024 ;; MSG SIZE rcvd: 121

Considerations

  • Ensure that your new NS addresses are registered correctly at your domain registrar.
  • Wait for up to 48 hours for DNS propagation to complete globally.

Using Custom NS

VergeCloud DNS allows you to use custom nameservers for your domain. With this feature, you can activate VergeCloud CDN and DNS services using dedicated nameservers, giving you more control and branding options.

Note: This feature is available in the professional and enterprise plans. Please upgrade your plan if you wish to use custom NSs.

Setting Custom NS via Dashboard

To set custom NSs, navigate to your VergeCloud CDN panel, and then go to the "DNS records" section.

Custom NS Section

In the "Customize Domain NS" section, enter your desired nameservers and confirm the changes.

Edit Custom NS

Setting Custom NS via API

You can also use the VergeCloud API to set custom NSs. Below is an example request:

  1. curl --location --request PUT 'https://api.vergecloud.com/domains/example.com/ns-keys' \ --header 'Authorization: Bearer API_KEY' \ --header 'Content-Type: application/json' \ --data '{"ns_keys":["ns1.example.com","ns2.example.com"]}'

Adding Glue Records

A Glue Record is a DNS record that provides the IP address of a nameserver when that nameserver is part of the domain it serves. Glue records prevent circular dependencies when resolving a domain. For example, if ns1.example.com is the authoritative nameserver for example.com, a glue record supplies the IP address of ns1.example.com to facilitate DNS resolution.

After setting custom NSs, VergeCloud will assign IPs to these nameservers. You will need to copy these IPs and register them as Glue Records in your domain registrar.

Glue Records

Testing

To verify the custom NS setup, use the following dig command:

  1. dig NS example.com

Sample Test Output

  1. ; <<>> DiG 9.16.1-Ubuntu <<>> NS example.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 56473 ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 1, ADDITIONAL: 1 ;; QUESTION SECTION: ;example.com. IN NS ;; ANSWER SECTION: example.com. 86400 IN NS ns1.example.com. example.com. 86400 IN NS ns2.example.com. ;; Query time: 58 msec ;; SERVER: 8.8.8.8#53(8.8.8.8) ;; WHEN: Thu ;; MSG SIZE rcvd: 114

Considerations

  • Custom NSs must be registered with their corresponding Glue Records, or they may not resolve correctly.
  • Propagation of custom NS changes may take up to 48 hours.

Account-Level Custom NS

Custom NSs can also be enabled at the user account level, applying these nameservers to all your domains. To enable this, contact VergeCloud support.