Redirect https www to non www problem using GoDaddy UCC certificate

Viewed 331

I am having an issue redirecting a https www domain to non www. I have a GoDaddy UCC SSL certificate and right now anyone who goes to the https www domain gets a Privacy error. I have been told that UCC certificates do no cover both www and non www domains, it's one or the other and I would have to list both on the certificate to get both covered. However there must be a better solution. Right now I have this in my htaccess file:

# BEGIN SSL
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteCond %{HTTP_HOST} ^(www\.)?example\.com$ [NC]
RewriteRule ^$ https://example.com$1 [R,L]
# END SSL 

This will redirect http://example.com and http://www.example.com to https://example.com but the https://www.example.com still gives me the Privacy error. I have also tried:

RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteRule ^ https://example.com%{REQUEST_URI} [L,NE,R=301]

and had the same problem. I checked on Redirect Mapper and it says that it should work but it doesn't. Can anyone help me out? Thanks!

0 Answers
Related