Skip to content

SSL Setup Fails for Amplify Gen 2 with Custom Domain Hosted on Vercel

0

I’m trying to set up a custom domain for my Amplify Gen 2 app, but I keep running into SSL issues.

Error from Amplify Custom Domain Setup:

SSL setup failed
One or more aliases specified for the distribution includes an incorrectly configured DNS record that points to another CloudFront distribution. 
You must update the DNS record to correct the problem.

Amplify CloudFront cannot activate SSL if another DNS record points to a different provider for the same subdomain. Vercel has a default wildcard record (* → cname.vercel-dns-017.com) which cannot be deleted, causing a conflict.

Is there a way to configure Amplify Gen 2 custom domains with the domain remaining in Vercel?

1 Answer
0

May consider the following as an option to make it work:

  1. Delegate a subdomain to Amplify o Keep your root domain (abc.com) managed by Vercel. o Create a subdomain (e.g., app.abc.com) and delegate it to Route 53 or another DNS provider you control. o Point only that subdomain to Amplify CloudFront distribution. o This avoids the wildcard conflict because Amplify owns the DNS zone for app.abc.com.
  2. Override the specific record in Vercel o Add an explicit CNAME or A record for the subdomain you want (app.abc.com) pointing to Amplify CloudFront distribution. o In theory, explicit records should override the wildcard. o However, Vercel DNS still advertises the wildcard, and Amplify’s SSL validation may continue to fail if it detects the wildcard conflict.
  3. Move DNS for the whole domain to Route 53 (or another provider) o Transfer DNS hosting from Vercel to AWS Route 53. o Configure Amplify’s custom domain there. o You can still point other records back to Vercel for apps you want hosted there. o This is the most reliable option if you want SSL to succeed.
EXPERT

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.