Forum Moderators: Robert Charlton & goodroi
Do we need to add the https version(s) in Webmaster Tools (Search Console)?
2 - Go over your code and make sure any http links are changed to https if need be.
Another argument for using site-absolute* links if you don't already. If your internal links start in / then any change in protocol will take effect globally and you don't need to do anything.
So... Is the suggested solution a crop of 301s or a rewrite rule in the htaccess or both?
a crop of 301s or a rewrite rule in the htaccess or both?
#non-www to https www
RewriteCond %{HTTP_HOST} !^(www\.example\.com)?$
RewriteRule (.*) https://www.example.com/$1 [R=301,L]
#if www met above, but not https then force it
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://www.example.com/$1 [R=301,L]
9 -Before generating a CSR, if you are on a shared hosting plan, Make sure your website is assigned STATIC IP, if your host offers it.
Also, as far as 301s go, I wouldn't redirect anything but instead use as in #4 with canonical tag, which brings me to:
10 - Analyze your current website visitors traffic, see how many users are still using IE8 on XP and other older versions of browsers.
And finally before pushing SSL site wide try displaying a message to users that the site will be ported over to SSL and their browser will not work any more. I'd do it for a few weeks.
Some of the older versions of Android stock Browser(not everybody has S6), cant connect to all HTTPS sites.
Only one of the two will ever be met
I wouldn't redirect anything but instead use as in #4 with canonical tag
If you have anything else in your htaccess file, especially anything to do with caching, the redirects must go first.
I believe this is what was meant
The rewrite will direct all traffic as you specify. I think the talk of 301s is for the sake of search indexes.
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} libwww-perl.*
RewriteRule .* ? [F,L]
Header set Strict-Transport-Security "max-age=31536000" env=HTTPS
RewriteCond %{HTTP_HOST} ^00\.28\.106\.21 [OR]
RewriteCond %{HTTP_HOST} ^www\.yourdomain\.com
RewriteRule (.*) https://yourdomain.com/$1 [R=301,L]
RewriteCond %{SERVER_PORT} 80
RewriteRule (.*) https://yourdomain.com/$1 [R=301,L]
# redirect www to non-www & http to https
RewriteEngine On
RewriteCond %{HTTP_HOST} !^(example\.com)?$ [OR]
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://example.com/$1 [R=301,L]
#force https
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://example.com/$1 [R,L]
#redirect www to non-www
RewriteEngine On
RewriteCond %{HTTP_HOST} !^(example\.com)?$
RewriteRule (.*) http://example.com/$1 [R=301,L]
Does the second option with 2 rules also create 2 redirects? if so should I add a 301 to the first rule?
Header set Strict-Transport-Security "max-age=31536000" env=HTTPS if for some reason you need to go back to http then you might have some visitors who won't be able to access your site (in this example for up to a year). This tells the browser to redirect any http links to https