Moving to https

#1
I am moving my site to https and i currently have a redirect in my htaccess that redirects my domain.com to www.domain.com. My question is..Do i add the http to https redirect code to it or do i delete it first. i want to still have the domain.com redirecting www.domain.com after switching to https.
 

AndyB

Well-known member
#2
The following image shows your .htaccess file, the two colored boxes show where I have added code. The green box forces HTTPS and the red box forces www.

Use this example if your forum is installed in the web root.

pic001.jpg

Code:
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

RewriteCond %{HTTP_HOST} ^example.com$ [NC]
RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L]
 

Jake B.

Well-known member
#5
Does SEO recommended redirecting to www? What the best for SEO with www or without www?
Doesn't matter for SEO. 99% of the time it's down to personal preference, though there are some technical reasons you'd want to go with www. instead of non-www, for example if you wanted to have a cookieless subdomain for a CDN. But the amount of bandwidth/time you'll save by not having those cookies is negligible for most people
 
#7
Almost all search engines are displaying my website with https except for google. Even the pages that just got published after switching to ssl get displayed with https on google for sometime then switches back to http. Any idea why.
 

CoZmicShReddeR

Well-known member
#10
Great now I might have to switch to removing www never thought about how hard it is for some people to type www! 😜 My sites set to redirect the domain if you don’t use https://www I been noticing more and more sites enforcing no www
 

M@rc

Well-known member
#11
Great now I might have to switch to removing www never thought about how hard it is for some people to type www! 😜 My sites set to redirect the domain if you don’t use https://www I been noticing more and more sites enforcing no www
Typing isn't the issue because you'd be redirected in most cases. I personally prefer shorter URLs (so no www for me).
 
Top