I have an API running at api.example.com
. I have this domain set up in AWS Route53 with a DNS A record that points it to a DigitalOcean server. This works fine.
There is a front end application that I'd like to deploy on Vercel. The initial deployment works, and I can access the deployed site at: https://example.vercel.app/
. Fantastic so far!
At this point I'd like to add a domain to Vercel so that users can access example.com
instead of example.vercel.app
. I'm guessing this is done behind the scenes by adding a CNAME record. When I add this domain, example.com
works fine, but the api.example.com
(and endpoints on that server) no longer resolve to the API running on DigitalOcean - now 404s are received and Vercel says it's not found.:
404: NOT_FOUND
Code: DEPLOYMENT_NOT_FOUND
ID: ..... long vercel related ID here .......
On Vercel, the DNS records shown are:
Nothing here stands out to me as something that would break api.example.com
from being resolved to the IP address of the DigitalOcean server.
Is there a way in Vercel to ensure that example.com
(and hopefully www.example.com
) get added as domains, but api.example.com
isn't touched? Almost seems like a wildcard domain is added behind the scenes or something like that. I could always just go buy another domain for the server side if this doesn't work.
Edit: It must be the * CNAME -> cname.vercel-dns.com.
record that causes this!