Skip to content

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.


  1. In a web browser, open your custom domain:

    https://example.com
    

    Or subdomains:

    https://www.example.com
    https://docs.example.com
    

    Expected behavior:

    • The website loads successfully
    • The page is served over HTTPS
    • No XML or “AccessDenied” messages appear
  2. 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.

  3. Test HTTP → HTTPS redirection:

    http://example.com
    

    Expected 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.

  4. Confirm that CloudFront is serving cached content.

    • Open Developer Tools → Network in your browser.
    • Refresh your website.
    • Inspect the x-cache response 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
  5. Test error handling by visiting a non-existent path:

    https://example.com/does-not-exist
    

    Expected behavior:

    • Your custom error.html page loads
    • CloudFront XML errors do not appear

    If XML appears, check that custom error responses are configured correctly for your distribution.