Non-WWW SSL Not Working

Status
Not open for further replies.

cservic2

New Member
Messages
2
Reaction score
0
Points
1
Hello. My site is www.computercompanions.net, and it is running WordPress 4.9.1. I set up Cloudflare SSL yesterday and it works for the www version. The problem is that the non-www version gets a security error (ERR_SSL_PROTOCOL_ERROR). Is there a way to redirect it? I tried to use the .htaccess but it didn't work.
 

caftpx10

Well-Known Member
Messages
1,534
Reaction score
114
Points
63
Did you use cPanel or Cloudflare's site to associate your domain to your Cloudflare account?
Normally, Cloudflare would do a root and wildcard for one "Universal SSL" certificate they set up (example.com, *.example.com).
Note that the '.htaccess' method will not work in this case as the browser wouldn't be able to reach the site anyway.
 

cservic2

New Member
Messages
2
Reaction score
0
Points
1
My site and Cloudflare are properly associated. There is an SSL certificate that follows what you described. Still, nothing.
 

lylex10h

Active Member
Messages
982
Reaction score
71
Points
28
Here's the code I use and it woks for me (WP 4.9.1 with Cloudflare)
Code:
# Redirect kolbys.x10host.com/abc to kolbys.net/abc
RewriteEngine on
RewriteCond %{HTTP_HOST} ^kolbys.x10host.com$
RewriteRule ^(.*)$ http://www.kolbys.net/$1 [R=301,L]
# End Redirect kolbys.x10host.com/abc to kolbys.net/abc

# Redirect kolbys.net to www.kolbys.net
RewriteEngine on
RewriteCond %{HTTP_HOST} ^kolbys.net$ [NC]
RewriteRule (.*) http://www.kolbys.net/$1 [R=301,L]
# End Redirect kolbys.net to www.kolbys.net

I also use the CloudFlare Flexible SSL WP plug-in. Make sure you follow the guide for that plug-in.
 
Status
Not open for further replies.
Top