Domain CNAME/A DNS records in Vercel REST API and SDK

For some time now, when adding a domain using DNS records (for domains not managed by Vercel), the entries are now dynamic - like XYZ.vercel-dns-016.com

There is a note in Vercel UI that the “The old records of cname.vercel-dns.com and 76.76.21.21 will continue to work but we recommend you use the new ones.”.

However in our usecase we connect new domains using Vercel REST API and it seems like the API doesn’t expose these DNS entries in the created domain - Domain Management - Vercel API Docs - there is just a verification object with TXT records for domain verification, but not the CNAME / A entries. API docs here: Add a domain to a project - Vercel API Docs

Do you plan on adding the DNS entries to the project domain REST API and Vercel SDK? How long will the old records of cname.vercel-dns.com and 76.76.21.21 keep working?

Looks like this can be achieved with Get a Domain's configuration - Vercel API Docs - which returns recommendedCNAME values

1 Like

Thanks for sharing what worked for you :slight_smile:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.