I'm trying to get my site so that every variation of domain.com will redirect to https://www.domain.com. I'm using a combination of tools to do so .. One is the NGINX config file which begins with:
server {
listen 80;
server_name domain.com;
return 301 https://www.domain.com$request_uri;
}
server {
listen 80;
server_name localhost www.domain.com;
root /usr/local/nginx/html;
I've also got a rule set up in my CDN to proxy all content through HTTPS:
if ( $scheme = http ) {
REWRITE RULE ^ https://$http_host$request_uri permanent
}
Almost every variation works, except https://domain.com .. it should redirect to https://www.domain.com, but it doesn't load.