Add a custom domain managed by a third-party DNS provider
If you are not using Amazon Route 53 to manage your domain, you can add a custom domain managed by a third-party DNS provider to your app deployed with Amplify.
If you are using GoDaddy or Google Domains, see Add a custom domain managed by GoDaddy or Add a custom domain managed by Google Domains for procedures specific to these providers.
To add a custom domain managed by a third-party DNS provider
-
Sign in to the AWS Management Console and open the Amplify console
. -
Choose your app that you want to add a custom domain to.
-
In the navigation pane, choose App Settings, Domain management.
-
On the Domain management page, choose Add domain.
-
For Domain, enter the name of your root domain, and then choose Configure domain. For example, if the name of your domain is https://example.com, enter
example.com
. -
By default, Amplify automatically creates two subdomain entries for your domain. For example, if your domain name is example.com, you will see the subdomains https://www.example.com and https://example.com with a redirect set up from the root domain to the www subdomain.
(Optional) You can modify the default configuration if you want to add subdomains only. To change the default configuration, choose Rewrites and redirects from the navigation pane, configure your domain, and then choose Save.
-
On the Actions menu, choose View DNS records. Use the DNS records displayed in the Amplify console to update your DNS records with your third-party domain provider.
-
Do one of the following:
-
If you're using GoDaddy, go to Add a custom domain managed by GoDaddy.
-
If you're using Google Domains, go to Add a custom domain managed by Google Domains.
-
If you're using a different third-party DNS provider, go to the next step in this procedure.
-
-
Go to your DNS provider's website, log in to your account, and locate the DNS management settings for your domain.
-
Configure a CNAME to point to the AWS validation server. For example, if the validation server is _cjhwou20vhu2exampleuw20vuyb2ovb9.j9s73ucn9vy.acm-validations.aws, enter _cjhwou20vhu2exampleuw20vuyb2ovb9.j9s73ucn9vy.acm-validations.aws. Amplify uses this information to verify ownership of your domain and generate an SSL/TLS certificate for your domain. Once Amplify validates ownership of your domain, all traffic will be served using HTTPS/2.
Note
The certificate generated by AWS Certificate Manager (ACM) is valid for 13 months and renews automatically as long as your app is hosted with Amplify. Amplify can't renew the certificate if the CNAME verification record has been modified or deleted. You must delete and add the domain again in the Amplify console.
Important
It is important that you perform this step soon after adding your custom domain in the Amplify console. The AWS Certificate Manager (ACM) immediately starts attempting to verify ownership. Over time, the checks become less frequent. If you add or update your CNAME records a few hours after you create your app, this can cause your app to get stuck in the pending verification state.
-
Configure a second CNAME record (for example, https://*.example.com), to point your subdomains to the Amplify domain. If you have production traffic, we recommended you update this CNAME record after your domain status shows as AVAILABLE in the Amplify console.
-
Configure the ANAME/ALIAS record to point to the root domain of your amplifyapp domain (for example https://example.com). An ANAME record points the root of your domain to a hostname. If you have production traffic, we recommended that you update your ANAME record after your domain status shows as AVAILABLE in the console. For DNS providers that don't have ANAME/ALIAS support, we strongly recommend migrating your DNS to Route 53. For more information, see Configuring Amazon Route 53 as your DNS service.
Note
Verification of domain ownership and DNS propagation for third-party domains can take up to 48 hours. For help resolving errors that occur, see Troubleshooting custom domains.