With this article, we plan to guide you through all the steps necessary on how to migrate a domain to Vercel without downtime. Your domain should be serving content from 3rd party servers that are unrelated to Vercel, and you need to be prepared to make the necessary DNS changes.
While Vercel will serve your domain with HTTP until a certificate is ready, it is a good experience for your users to use HTTPS. Therefore, to ensure the certificate exists beforehand, you can generate it manually. To do so, you can use the following commands using the Vercel CLI:
vercel certs issue *.example.com example.com --challenge-only
We recommend users to issue certificates for the specific domains they want to migrate. If the DNS configuration of
example.com is pointing to non-Vercel servers, and you plan to migrate both
example.com to Vercel deployments, you can create a challenge with the following command:
vercel certs issue www.example.com example.com --challenge-only
After running the command above, make sure you insert the necessary TXT records in your DNS provider. You can also check if the records are correct with the command
dig TXT _acme-challenge.example.com +short
After the challenge is in place, we can issue the certificate. You can enter the command previously used without the
vercel certs issue www.example.com example.com
We learned how to generate a certificate before we assign a domain to a Vercel deployment. Before you change the DNS records of your domain, we can verify if the certificate is correct and will be accepted by browsers. You can run the following command:
curl https://example.com --resolve example.com:443:220.127.116.11 -I
If the request is successful, we confirmed the certificate is working and you can proceed with the migration.
Once you have added the domain to your Vercel project and also verified the certificate is working as expected, you can choose three options of records to finally complete the migration: A, CNAME, or Nameservers. In case you decide to use an A or a CNAME record, then you can change those records in your DNS provider to make Vercel serve your deployment from the selected domain, as instructed on your dashboard.
If you decide to change the Nameservers of your domain, you can follow the instructions on the following article: "How can I do a "Zero Downtime" DNS migration to Vercel?". Once all your records are included on Vercel, you can change the Nameservers and wait for propagation.