How to 301 redirect SSL URLs to non-SSL URLs using .htaccess

If you would like to rewrite your SSL URLs to non-SSL URLs then please add the following code to your .htaccess file.

RewriteCond %{SERVER_PORT} ^443$
RewriteRule ^(.*)$$1 [R=301,L]

The above code should be used in the following conditions:

1. Your website used to run on https:// and now it does not use SSL.
2. Your website has case your website is not using SSL anymore and you have https:// pages indexed in Google and other search engines.


Leave a Comment