Test and Verify the Deployment
After DNS mapping is complete, perform the following tests to ensure the website is functioning correctly through CloudFront over HTTPS.
-
In a web browser, open your custom domain:
https://example.comOr subdomains:
https://www.example.com https://docs.example.comExpected behavior:
- The website loads successfully
- The page is served over HTTPS
- No XML or “AccessDenied” messages appear
-
Verify that the SSL certificate is valid by checking the browser address bar.
Indicator Meaning 🔒 Secure lock icon SSL certificate is active Certificate issued to your domain ACM certificate is applied correctly No certificate warnings DNS and CloudFront configuration is correct If you do not see the lock icon or receive a warning, review your DNS and CloudFront certificate settings.
-
Test HTTP → HTTPS redirection:
http://example.comExpected behavior:
- The request automatically redirects to HTTPS
- The site does not remain on HTTP
If redirection fails, verify that the Viewer protocol policy in CloudFront is set to Redirect HTTP to HTTPS.
-
Confirm that CloudFront is serving cached content.
- Open Developer Tools → Network in your browser.
- Refresh your website.
- Inspect the
x-cacheresponse header.
Result Meaning Hit from CloudFront Content served from CDN cache (expected) Miss from CloudFront First request for that object (normal) RefreshHit / Revalidated Cached content reused after validation -
Test error handling by visiting a non-existent path:
https://example.com/does-not-existExpected behavior:
- Your custom
error.htmlpage loads - CloudFront XML errors do not appear
If XML appears, check that custom error responses are configured correctly for your distribution.
- Your custom