Redirect Entire Site to HTTPS
-
I moved a 300+ page WP site from http to https about 6 months ago and have been experiencing weird bouncing around in the SERPS for all engines. Today I decided to look closer because my smaller sites don’t do this. I ran the IIS SEO bot/tool to crawl it for errors. I found it had about 5000 redirect loop errors that aren’t noticeable on the frontend – it usually loads in under 3 seconds.
I used the headers output tool at AskApache to see the output, and get a definite redirect loop error that closes with: “HTTP/1.1 400 Bad Request”
My htaccess code looks like this:
<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^(.*) https://%{SERVER_NAME}/$1 [R=301,L] RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>
I’ve tried about 200 changes to this code today trying to resolve the loop problem. When I ran the tool against www.remarpro.com it redirects http requests via a 301 and stops as it should, but the www.remarpro.com server is using NGINX instead of Apache or I would ask for a copy of that code.
I have edited the general settings for my install to both point to https:// and have had a “green address bar” for months until today. When I started playing around with the htaccess, it caused all of my images on the site to revert to https:// URI’s??
Two separate problems that are somehow connected, but I’d be glad to know how to resolve the redirect loop most of all. I read a ton of articles here about how to configure this, and every one I checked had an invisible redirect loop problem as well. Both Google and Bing say this will severely affect rankings in a bad way.
- The topic ‘Redirect Entire Site to HTTPS’ is closed to new replies.