0

I need to know how put a 301 Redirect in my htaccess which points https back to http. Can you help?

I see plenty of posts for going from http to https, but not in reverse!

I am switching back from Cloudflare and their SSL back to normal http - my search rankings never recovered after the switch and so just taking it back to normal.

stambata
  • 1,668
  • 3
  • 14
  • 18
Mike
  • 1
  • 1
    You'll need a valid SSL certificate (Cloudflare or otherwise) to do so. Using Cloudflare shouldn't hurt your SEO - are you *sure* this is the cause? – ceejayoz Jun 21 '16 at 01:05
  • I already had the SSL up from Cloudflare running for 1 month, I have removed it and switched my DNS back. Now need a 301 to point the Https version back to http – Mike Jun 21 '16 at 02:51
  • 1
    Be sure you don't have `strict transport security` (`HSTS`). If you do, you cannot go back, basically. – Halfgaar Jun 21 '16 at 12:48
  • @Mike You'll need an SSL on your server to do that. Has to be valid HTTPS to get to the redirect. – ceejayoz Jun 21 '16 at 12:53
  • 1
    **Don't use a 301 redirect**. If you previously used a 301 redirect when going from HTTP to HTTPS then there is **no way** to reverse this for anyone whom has visited your site short of re-installing their browsers. Man up and get an SSL certificate. – symcbean Jun 21 '16 at 14:35
  • 1
    Google ranks sites with SSL certs as higher: https://webmasters.googleblog.com/2014/08/https-as-ranking-signal.html Furthermore, CloudFlare won't affect SEO: https://blog.cloudflare.com/cloudflare-and-seo/ – mjsa Jun 22 '16 at 01:17

1 Answers1

0

something like:

RewriteEngine On 
RewriteCond %{HTTPS} on
RewriteRule ^ http://%{HTTP_HOST}%{REQUEST_URI} [R,L]

Should do the trick in an .htaccess

Edit: last part fell off. And indeed if you have no valid ssl the redirect will never get served without an error .. ( letsencrypt has free ssl certs...)

evilBunny
  • 54
  • 4
  • No, that will only work if you add `[R]` on the end of the rewrite rule - and is predicated on an ability to decrypt an HTTPS request and encrypt the response (i.e. have a working TLS cert installed) which the OP no longer has. – symcbean Jun 21 '16 at 14:39