https to http from .htaccess

We have several confusions in wordpress website that how to switch SSL to NON SSSL page.

  • Step 1  : Copy your current website .htaccess file from root folder first
  • Step2 : Edit the .htaccess file and copy the code give below at the top of the file
RewriteEngine On
# ensure www.
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Just paste the upper code and enjoy SSL to NON SSL switching. It will also give you SEO benefits because if you are hitting http://somewebsite.com it will open like http://www.somewebsite.com

Google search console also recommends that we should use either www or non www url scheme. If you haven’t well defined it you may get some issues in SEO.