* My website’s IP address renders a 200 status code.
* Oddly, some http status checkers report a 301, but crawlers dont and my browser doesnt. The IP is also indexed in Google Search.
* **Maybe important:** I’ve had my website blocked with robots.txt for the last 6 months (I initially allowed the homepage to be indexed) and I switched my hosting from a shared IP to a dedicated IP last week (prior to removing the robots.txt). What is indexed is my new dedicated IP.
What is the easiest way to combine the exisiting SSL redirect rules along with an IP redirect rule?
Note: my website doesn’t have the www prefix (so it’s “[https://domain.com](https://domain.com)” that renders).
Here’s what my htaccess file currently has:
#Begin Really Simple SSL Redirect
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
</IfModule>
#End Really Simple SSL Redirect
I tried searching reddit – the question has been asked somewhat similarly before, but the solution provided wasn’t clear.
I tried adding this code to htaccess as recommended in another post, but it didn’t fix the IP address issue (it still renders a 200 status code in browser and with the crawling tool (Screaming Frog):
​
RewriteEngine On
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^www.example.com(.*)$ [NC]
RewriteRule ^(.*)$ https://example.com$1 [R=301,L]
​
[ad_2]