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
• 14,970 points
47 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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
• 56,120 points

Related Questions In AWS

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 6 days ago in AWS by Vedant
6 views
+1 vote
2 answers
+1 vote
10 answers
+2 votes
3 answers
+13 votes
2 answers
+1 vote
2 answers

AWS CloudWatch Logs in Docker

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

answered Sep 6, 2018 in AWS by bug_seeker
• 14,970 points
230 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,240 points
1,329 views
0 votes
1 answer

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.