Search code examples
amazon-web-servicesamazon-cloudfront

Redirection from HTTP to HTTPS in CloudFront


I have created a CloudFront distribution for the static website, but my website does not work on http anymore. It works fine with S3 endpoint, but gives a blank page on CloudFront endpoint and my website. Check the images for reference.

iamge1

image2


Solution

  • I have faced similar issue where my https://url.com was giving me blank page. In my case I have made few changes in my distribution which helped me to resolve the issue:

    • I have removed the index.html as the root object as my code did not have index.html reflecting to anything.
    • I have also changed my allowed methods from just GET & HEAD to GET,HEAD,OPTIONS.