Saturday, March 12, 2016

amazon web services - How to forward https://example.com to AWS ELB

I have bought a domain example.com and am hosting it on AWS Elastic Beanstalk. To support HTTPS, I issued wildcard certificate from AWS certificate manager for *.example.com and assigned it to EB instance and ELB both. Since I bought the domain at Godaddy, I also added CNAME wildcard (*) DNS entry at Godaddy DNS and gave ELB AWS name in target value.




Doing so works for subdomains just fine and I can hit https anystring.example.com and go to index page of my EB environment. But the problem is that I cannot use https example.com (without subdomain) to go to the environment. It does not find the domain entry. And I do understand why, but not sure what to do to resolve it.



I tried adding a new CNAME entry:
Name: @
Value: ELB AWS Value
But Godaddy gave me error that the record is already present. I searched and found on SO that as long as some @ entry exists, I can't add another one.



I searched around more and did couple of more things to make progress:
1. I added a CNAME www entry and assigned ELB AWS name in target so now I can hit https www.example.com and go to env. index page.
2. I added a domain forward (forward @ to https www.example.com) so putting just example.com in URL works and forwards to https www.example.com



But I'm still not able to go to the index page using https example.com




Any advice?

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...