SSL www not working?

Maxoq

Well-known member
Registered
Joined
Feb 25, 2015
Messages
520
Points
28
I have seen more people complaining that SSL www not working on their site but I checked with my websites are doesn't see any issues. Can anyone guide me how to check if both www and non www are working with my current SSL or not? normally I use www for all my domain but for a few long domains, I used non www and used 301 redirect to redirect www to non www and vice versa. Are there somethings wrong with that?
 

24x7serverman

Well-known member
Hosting Provider
Registered
Joined
Jul 25, 2017
Messages
651
Points
28
SSL should work with the www and non-www. You will need to make sure that your website with www and without www resolving the the same IP address that is to the same server. Also, once confirm with your SSL provider that there won't be any issue.

You can add the below redirection code in your configuration or .htaccess file, if you would like -


Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.yoursite.com$
RewriteRule ^/?$ "http\:\/\/yoursite\.com" [R=301,L]
 

Localnode

Well-known member
Registered
Joined
Dec 15, 2015
Messages
333
Points
43

mobin

Well-known member
Registered
Joined
Jun 22, 2017
Messages
234
Points
28

AaronSmith

Member
Registered
Joined
Jun 15, 2017
Messages
17
Points
3
I guess, you have used following code in your .htaccess file

#Force non-www:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.example\.com [NC]
RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]

Make sure, you can use 301 redirection code for forcing either www or non-www in the .htaccess file.

If SSL certificate is issued on www.example.com, then It will automatically work for example.com as well.

So, I can say nothing is wrong.
 
Older Threads
Latest Threads
Replies
1
Views
26
Replies
0
Views
189
Replies
1
Views
40
Replies
2
Views
83
Recommended Threads

Latest postsNew threads

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top