Routing example.com to www.example.com for secure https connection

153 views Asked by At

I have an AWS loadbalancer with a certificate routed from www.example.com that works fine using HTTPS. On a desktop-top browser example.com will automatically route to www.example.com. On a phone example.com doesn't add the www and loses its HTTPS secure connection. Is there a way to fix it? The URL on the certificate is formatted like www.example.com

1

There are 1 answers

3
Dean O'Brien On

You can setup AWS load balancer to redirect HTTP to HTTPS by adding listeners: https://aws.amazon.com/premiumsupport/knowledge-center/elb-redirect-http-to-https-using-alb/

Alternatively, you could make these redirects happen as it hits the application server (using IIS for example):

Http => Https https://www.google.com/amp/s/www.ssl.com/how-to/redirect-http-to-https-with-windows-iis-10/amp/

Non www to www https://weblogs.asp.net/owscott/iis-url-rewrite-rewriting-non-www-to-www