Oops, part 2 of redirect question


(shari joseph) #1

sorry, incomplete question before. 2 options when going to https. Option 1, you don’t have to reupload the site with added httpS, the host (hostgator) simply updates site to https for you. Option 2, you upload an httpS site to replace the http site. Will a redirect work in both instances?? In the case of hostgator, do you even need to upload an updated httpS site?? thank you all again!!


(Joe Workman) #2

Have a listen to this podcast episode…


(LJ) #3

You don’t want a situation where http goes to http and https goes to https. Redirection is vital. Here’s my checklist:

  1. Re-upload your RW website as https
  2. Be aware that there may be other instances of http calls in the website that are NOT related to the core RW product and may need to be adjusted manually. E.g. Formloom plug-in needs SSL switched on in the HUD; web font calls from http instead of https may need adjusting in CSS or Index file; Google maps may not work and so on. Often these will cause your website to appear as ‘Not fully secure’.
  3. Put a redirect in your htaccess file. You need to force httpS and decide if you want the www version or non www version (the code below works well for me)
  4. Once all is working, go to Google Search Console, make sure 4 versions at least are added (http, https, http://www and https://www) and set your ‘canonical’ version. This will help SEO
  5. Add a sitemap for the secure canonical version - if there is one on the non secure version it should be deleted but my advice is leave it there until the secure site is fully indexed.

Here’s the htaccess scripts I use - there seem to be plenty of variations:

htaccess Force https and non www:

RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^www. [NC]
RewriteCond %{HTTP_HOST} ^(?:www.)?(.+)$ [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [L,NE,R=301]

htaccess force https and www

RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www. [NC]
RewriteCond %{HTTP_HOST} ^(?:www.)?(.+)$ [NC]
RewriteRule ^ https://www.%1%{REQUEST_URI} [L,NE,R=301]


(shari joseph) #4

Thank you so much for your wonderfully detailed response! It was quite helpful!


(LJ) #5

Thank you - hope it helps. It’s a bit tedious doing all of this stuff but worth it.


(system) #6

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.