Skip to content

Verify custom domain in amplify fails

1

I have been trying to add a custom domain, but it fails repeatedly. The issue I'm facing is

  1. I add a custom domain "app.feedal.io"
  2. It took me to the verification page (uploaded image), but it does not show the DNS details.
  3. I copy the DNS records from Action > View DNS records
  4. By the time I copy and paste the records in my CloudFlare DNS, the verification has already failed

Enter image description here

When I click on Retry, it takes me to the custom domain add page.

Enter image description here

  1. When I click "Save" without modifying anything, nothing happens
  2. Then I click "Custom Domain" from the sidebar, and it takes me to the verification page.
  3. But after I had clicked on the "Save" button in step 1, the DNS records have changed from the previous record, and now a DNS update is required again.
  4. But, by the time I update the DNS records, the verification has failed.

This is a repeating process because there is no option to "Retry" the same verification, and even without modifying anything, just clicking "Save" creates a new DNS record.

asked a year ago154 views

2 Answers
0

When experiencing verification failures while adding a custom domain to AWS Amplify, this is typically related to the AmplifyWaitTimeout exception. This occurs when Amplify cannot find the correct CNAME records in your domain's DNS settings within the expected timeframe.

Here's how to troubleshoot this issue:

  1. Timing is critical: Update your DNS records immediately after adding the custom domain in Amplify. AWS Certificate Manager (ACM) starts verification attempts right away, and these checks become less frequent over time. The verification process can time out if you don't add the CNAME records quickly enough.

  2. DNS Provider Settings: Since you're using Cloudflare, ensure that the Proxy status for your CNAME records is set to "DNS only" (not proxied). Cloudflare's proxy can interfere with AWS's domain validation process.

  3. Check for conflicting records: Verify that there are no existing records for the same domain/subdomain pointing elsewhere. These might cause conflicts with your new CNAME records.

  4. Verify DNS propagation: Use the dig command or online DNS lookup tools to check if your CNAME records are properly configured and publicly visible.

  5. Clean up before retrying: Before attempting to add the domain again, make sure to remove all previous CNAME records related to the old verification attempts from Cloudflare.

  6. Check for conflicting CloudFront distributions: Even if you've deleted previous Amplify apps using this domain, the association between your domain and a CloudFront distribution might still exist in AWS's systems.

  7. Wait between attempts: Instead of immediately clicking "Save" again after a failure, wait a few minutes before trying again to allow DNS changes to propagate.

If these steps don't resolve the issue, you might need to contact AWS Support for further investigation of your specific configuration.
Sources
Timeout when creating custom domain on AWS amplify | AWS re:Post
CNAME problem deploying a custom domain in Amplify | AWS re:Post
Custom domain for Amplify not working | AWS re:Post

answered a year ago

  • Thans for the reply.

    1. In first point, how quick do you mean by quickly? I tried to complete it within a minute but it still fails.
    2. In point 7, to wait between attempts, even if after wait I click on "Save" it generates new DNS records. In this case now again I have to quickly update as suggested in step 1.

    Either the DNS values should not be changing on clicking "Save" or it should give some time to update DNS (at least 5 minutes)

0

This is exactly happening to me right now! I had a record for CNAME already with the name on my domain while trying to do all of this and it was to an old version of the cloudfront url. I hit Save and and Amplify gives a completely new cloudfront url to update. It's a loop you can not seem to get out of. This is a very poor design by them recreating the cloudfront urls everytime.

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.