- Newest
- Most votes
- Most comments
There are a few potential reasons why your site isn't displaying when using your domain name, even though it works with the CloudFront URL. Here are some steps to troubleshoot and resolve the issue:
-
Check your DNS configuration: Ensure that your domain's DNS settings at IONOS are pointing to the correct Amazon Route 53 nameservers. If you've transferred your domain management to Route 53, verify that the nameservers listed in your registered domains match those in your Route 53 hosted zone.
-
Verify Route 53 records: In your Route 53 hosted zone, confirm that you have the correct A and AAAA alias records set up for both your root domain (example.com) and www subdomain (www.example.com). These should point to your CloudFront distribution.
-
CloudFront configuration: Make sure your CloudFront distribution is set up to accept requests from your domain. Check that you've added your domain name (and www subdomain if applicable) as alternate domain names in the CloudFront distribution settings.
-
SSL/TLS certificate: Verify that you have a valid SSL/TLS certificate in AWS Certificate Manager (ACM) that covers your domain name, and that it's properly associated with your CloudFront distribution.
-
Cache issues: If you've recently made changes, try clearing the CloudFront cache by creating an invalidation. Also, clear your browser cache or try accessing the site from a different browser or device.
-
Propagation time: DNS changes can take some time to propagate. If you've recently made changes, wait for 24-48 hours for full propagation.
-
Check for SERVFAIL: Use the 'dig' command to check if your domain returns a SERVFAIL error. If it does, this could indicate an issue with your nameservers or DNS configuration.
If you've verified all these points and are still experiencing issues, you may need to double-check your entire setup against AWS documentation or seek further assistance from AWS support.
Remember, when making changes to your DNS or CloudFront settings, it's normal for there to be a delay before the changes take effect due to caching and propagation times.
Sources
Route53 domain not connecting to cloudfront distribution with static site | AWS re:Post
Configured Route53 URL is not working with Cloud Front URL | AWS re:Post
S3 static Website not syncing with my CloudFront | AWS re:Post
Hello. You should ensure that your your ACM certificate and CloudFront distribution have the alternate domain name added to them.
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/CNAMEs.html https://docs.aws.amazon.com/acm/latest/userguide/acm-public-certificates.html
