aws-amplify / aws-amplify/amplify-hosting
Unable to get custom subdomain to work - should I be using different CNAME ?
- Dominant language
- Dockerfile
- Stars
- 481
- Forks
- 123
- PR merge metrics
- No merged PRs in 30d
Description
### Before opening, please confirm:
- [X] I have checked the [custom domains troubleshooting guide](https://docs.aws.amazon.com/amplify/latest/userguide/custom-domain-troubleshoot-guide.html).
- [X] I have read the guide for [submitting bug reports](https://github.com/aws-amplify/amplify-hosting/blob/master/CONTRIBUTING.md).
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
### App Id
du0vcipq8yvcf
### Region
_No response_
### Step
Final step - can't visit domain
### Status
Shown as "Available" but not working
### Issue or question
I've followed the instructions here for adding a subdomain (using 3rd party DNS) but am still unable to reach my amplify app at the subdomain.
https://docs.aws.amazon.com/amplify/latest/userguide/to-manage-subdomains.html
When I check https://www.whatsmydns.net/#CNAME/beta.syncmyworkout.com it shows that the CNAME has propagated across global nameservers, so I'm not sure what the issue is.
I'm a little confused by these instructions, they seem to contradict each other. When I try visiting my .cloudfront.net url directly it 404s, but the troubleshooting guide suggests that it will always 404.
(Found under Amplify -> App Settings -> Domain Management -> Actions -> View DNS Records)
> If you are migrating a custom domain that is already serving production traffic, please wait until your new application loads successfully at the .cloudfront.net url shown below before updating your DNS records:
(Found under: https://docs.aws.amazon.com/amplify/latest/userguide/custom-domain-troubleshoot-guide.html)
> I get a 404 error on the CloudFront URL
> To serve traffic, Amplify Hosting points to a CloudFront URL via a CNAME record. In the process of connecting an app to a custom domain, the Amplify console displays the CloudFront URL for the app. However, you cannot access your application directly using this CloudFront URL. It returns a 404 error. Your application resolves only using the Amplify app URL (for example, https://main.d5udybexample.amplifyapp.com/, or your custom domain (for example www.example.com).
Should I point the CNAME to my `prod.du0vcipq8yvcf.amplifyapp.com` instead?
Should I be adding a second CNAME for `www.beta.syncmyworkout.com`?
I also checked out the FAQ here: https://github.com/aws-amplify/amplify-hosting/blob/main/FAQ.md#how-do-i-migrate-domains-to-amplify-with-minimal-downtime
I'm not sure what this instruction refers to:
> Remove the CNAME from your CloudFront distribution.
### Error message
_No response_
### Additional information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.