title: Vercel deployment with server side and client software using the same domain name
body: <p>I have an API running at <code>api.example.com</code>. I have this domain set up in AWS Route53 with a DNS A record that points it to a DigitalOcean server. This works fine.</p>
  <p>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: <code>https://example.vercel.app/</code>. Fantastic so far!</p>
  <p>At this point I'd like to add a domain to Vercel so that users can access <code>example.com</code> instead of <code>example.vercel.app</code>. I'm guessing this is done behind the scenes by adding a CNAME record. When I add this domain, <code>example.com</code> works fine, but the <code>api.example.com</code> (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.:</p>
  <pre><code>404: NOT_FOUND
  Code: DEPLOYMENT_NOT_FOUND
  ID: ..... long vercel related ID here .......
  </code></pre>
  <p>On Vercel, the DNS records shown are:</p>
  <p><a href="https://i.stack.imgur.com/vnDYQ.png" rel="noreferrer"><img src="https://i.stack.imgur.com/vnDYQ.png" alt="enter image description here" /></a></p>
  <p>Nothing here stands out to me as something that would break <code>api.example.com</code> from being resolved to the IP address of the DigitalOcean server.</p>
  <p>Is there a way in Vercel to ensure that <code>example.com</code> (and hopefully <code>www.example.com</code>) get added as domains, but <code>api.example.com</code> 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.</p>
  <p>Edit: It must be the <code>* CNAME -&gt; cname.vercel-dns.com.</code> record that causes this!</p>