Redirect working from www xyz com to https xyz com but not from https www xyz com

+1 vote

I've hosted a static website on AWS using S3, CloudFront and Route53.

I issued a certificate (covering *.xyz.com and xyz.com) with Certificate Manager and everything is working fine when I enter xyz.com and www.xyz.com. Both URLs redirect to https://xyz.com, which is exactly what I want.

But if i try to go to https://www.xyz.com it does not work, although http://www.xyz.com does work. Why is that?

I'm assuming I'm doing something wrong in Route53 or CloudFront.

Aug 28, 2018 in AWS by bug_seeker
• 15,530 points
911 views

1 answer to this question.

0 votes
  1. Make sure you have created the certificate in us-east-1 region to be used with Cloudfront.

  2. Make sure you have entered both www.example.com and example.com in CloudFront Alternate CNAME entries.

  3. Make sure the behavior is set to Redirect HTTP to HTTPS

  4. Make sure index.html file is present in the origin. It can also be specified explicitly in Cloudfront distribution.

If you can provide your distribution settings, it would be helpful.

answered Aug 28, 2018 by Priyaj
• 58,080 points

Related Questions In AWS

+2 votes
1 answer

How to redirect EC2 Elastic Load Balancer from HTTP to HTTPS?

Hi@akhtar, AWS Application Load Balancers now support native ...READ MORE

answered Aug 13, 2020 in AWS by MD
• 95,360 points
1,224 views
0 votes
1 answer

Redirect HTTP traffic to HTTPS request on ELB

Change your server config file if ($http_x_forwarded_proto = ...READ MORE

answered May 17, 2019 in AWS by Vedant
456 views
0 votes
1 answer
0 votes
1 answer
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
1,771 views
+1 vote
2 answers

AWS CloudWatch Logs in Docker

The awslogs works without using ECS. you need to configure ...READ MORE

answered Sep 7, 2018 in AWS by bug_seeker
• 15,530 points
1,203 views
+1 vote
3 answers

Not able to pass params POST to AWS Lambda from Amazon API Gateway

For this template : application/x-www-form-urlencoded  This line below will ...READ MORE

answered Jun 13, 2018 in AWS by Cloud gunner
• 4,660 points
7,219 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP