How can I do a "Zero Downtime" DNS migration to Vercel?

When you are hosting your DNS records on a certain provider, and you want to move that configuration to another Nameserver, you must follow a few steps to ensure the migration is as smooth as possible. This article will help you migrate your DNS configuration to any provider and avoid downtime.

Clone the Current DNS Configuration

To locate the current DNS provider of your domain, you can run the following command:

dig NS example.com +short
Checking the DNS authority for a domain using the terminal.

The result will show the current DNS authority. Next, you'll need to locate your DNS records from the provider's dashboard. If you are using Vercel, the DNS configuration is located in your dashboard.

After you've successfully located all records associated with your domain, you can either download a "zone file" or copy each record manually to the new provider.

Verify the Records

To verify the records, you can query the DNS configuration served by the future DNS authority:

dig A api.example.com +short @ns1.vercel-dns.com
Checking the DNS configuration of the A record under "api" served by Vercel.

If you were moving your DNS to Cloudflare, for example, the correct command would be:

dig A api.example.com +short @example.ns.cloudflare.com
Checking the DNS configuration of the A record under "api" served by Cloudflare. The example should be replaced with the authoritative nameserver given by your provider.

Before proceeding, we recommend checking every record you moved. For more insight into the DNS resolution, remove the +short flag.

Switch the Nameservers

In your registrar's dashboard (where you bought the domain), change the Nameservers to your new provider. If you're changing this domain to Vercel's name servers, the name servers would be ns1.vercel-dns.com and ns2.vercel-dns.com.

Nameserver changes can take up to 48 hours to propagate. If you bought the domain from Vercel, reach out to Vercel Support for the Nameserver change.

Couldn't find the guide you need?