Dumb SEO Questions

(Entry was posted by Shelly Fagi on this post in the Dumb SEO Questions community on Facebook, 02/15/2018).

I want to push to https first and then the non-www to www

Okay SEO friends. I have a tech issue that is driving me crazy. I have several client sites that use the www version as their primary URL. Now that they have an SSL cert installed I am trying to directly 301 redirect to the https version of the site first before the non-www to www redirect kicks in. Ideally, I`d love a redirect that redirects all versions directly to the https://www site in one step, but if I can`t accomplish that, I at least want it to push to https first and then the non-www to www. Any ideas?
This question begins at 00:29:22 into the clip. Did this video clip play correctly? Watch this question on YouTube commencing at 00:29:22
Video would not load
I see YouTube error message
I see static
Video clip did not start at this question

YOUR ANSWERS

Selected answers from the Dumb SEO Questions Facebook & G+ community.

  • Tom Gooden: Apache?
  • Haris Khan: i dont know what you use. but you can go to FTP and unhide all the hide file there then you will see .htaccess if its not there create one with the exact name .htaccess and paste the below code in it then save. RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://www.example.com/$1 R=301, L RewriteCond %{http_host} ^example.com NC RewriteRule ^(.*)$ https://www.example.com/$1 R=301, L
  • Paul Thompson: The best practice for this has changed with the advent of SSL. You need to redirect to the HTTPS first and then to the HTTPS canonical if necessary. Otherwise you can`t implement HSTS properly. (And HSTS, especially with preload) will more than make up for the slight extra delay of the 301 redirect.
  • Jenny Halasz: Shelly Fagin as I recall, this is a setting in Wordpress. Go to settings in the UI and make sure it’s set to https default. Otherwise wp overrides your htaccess file and causes the early redirect.

View original question in the Dumb SEO Questions community on Facebook, 02/15/2018).