Redirect from HTTPS to HTTP

There are some specific cases when you want to redirect particular URL or a single website to be opened through HTTP instead of HTTPS. For that purpose you should add the following rewrite rule in your .htaccess file:

This will redirect your "https://yourdomain.com" to "http://yourdomain.com". That is, the opposite of what everyone teaches.

For more details how to redirect your website from HTTP to HTTPS, please visit this article.

You find this article useful? Click here to learn more about SiteGround web hosting experts and what else we can do for you!

14 Comments

  1. Reply December 7, 2015 / 20:03 SukantaSiteGround Team

    I also have some sites hosted at Siteground and previously tried free 1 year SSL but for this SSL certificate all my Addon Domains got wrongly indexed by google with https and though I can not implement more than 1 ssl on single cpanel it showed wrong certificate warnings but if I or anyone ignores the warning and continues to the addon domain it redirects to the main domain which was SSL enabled . So anyone browses with https goes to main account domain and with http towards addon domain. For this reason I have removed the SSL and now all https requests are showing invalid.

    I also tried this above code and it is showing this message "An error occurred. Sorry, the page you are looking for is currently unavailable. Please try again later. If you are the system administrator of this resource then you should check the error log for details. Faithfully yours, nginx."
    I have also tried this below code but same result as above :
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^domain.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www.domain.com$
    RewriteCond %{SERVER_PORT} ^443$
    RewriteRule ^(.*)$ http://domain.com [R=301,L]

    A very bad experience I faced for this SSL implementation also 2 things to mention if you are implementing SSL you are not able to experience SuperCacher which is awesome without https and must use Premium Cloudflare CDN because free version not supports SSL
    Thanks
    Sukanta

    • Reply December 8, 2015 / 13:45 Ivan YordanovSiteGround Team

      The SSL setup is working properly for the domain that you have installed the SSL on. Unfortunately, the current setup does not allow to have more than one SSL per cPanel account.To avoid such issues, I would recommend you to setup SSL redirections only for the domain you will use the SSL for. The rest of the domains should not have such redirection so they can be properly opened with HTTP://.

      Our SuperCacher is compatible with SSL sites, so you should not experience issues with setting it up. However, indeed, in order to use Cloudflare with SSL on the origin server, you will need to purchase Cloudflare Plus.

      Regarding the error message you have mentioned - please open a support ticket and describe the case in details. We will be happy to assist you.

  2. Reply September 14, 2016 / 14:18 Suanlian TangpuaSiteGround Team

    Hi, how to redirect https://subdomain.domain.com to http://subdomain.domain.com.

    I dont want the https on my subdomain

    • Reply September 15, 2016 / 13:06 escalationsSiteGround Team

      This article explains precisely that.

      Note also, that unless explicitly specified somewhere in the .htaccess or the configuration for your website, the domain name will not automatically redirect to https anyway.

  3. Reply October 23, 2016 / 14:08 VinySiteGround Team

    can't login to wp-admin after doing redirection

    • Reply October 24, 2016 / 14:44 Ivan StefanovSiteGround Team

      Viny, please submit a support ticket using your User Area and my colleagues will be happy to identify the issue for you.

      Thank you!

  4. Reply November 23, 2016 / 09:14 MichaelSiteGround Team

    Doesn't work. Added this to the .htaccess file and still get a 404 page when trying to access via https.

    • Reply November 24, 2016 / 12:07 Ivan StefanovSiteGround Team

      Mickael, most probably there is a domain specific application, which relies on predefined https protocol in its configuration/database and that's why the .htaccess code isn't applicable. Still, you can submit a support ticket and our technical operators will be able to look more closely.

  5. Reply November 29, 2016 / 12:30 MohitSiteGround Team

    Hlo
    I am use this code to .htcaccess file after this i check my website this code work great all url convert automatic https://example.com to http://example.com but here a problem when i change my home page from latest posts to static page(any page from pages list)
    Then only home page not open show error too many redirectes but other pages are work find like http://example.com/page only home page show this error so what i do pls help

    • Reply November 29, 2016 / 15:10 Ivan StefanovSiteGround Team

      Mohit, considering your explanation I assumed that you're using WordPress and in such case you need to change the SiteURL to http://domain.com from the backend. You may also use this tutorial.

  6. Reply March 4, 2017 / 15:15 MirkoSiteGround Team

    Hi ,Ivan I am Mirko and I have a game website where I just passed to ssl but I have content on my play game page who came from non https websites and not load for this.
    I am forced to use in config.php file https to make site to work.
    I please you to help me with a code for htaccess to redirect the link to http from https.
    Now I use the code below to redirect to http :
    RewriteCond %{HTTPS} ^on$
    RewriteRule ^(.*)$ http://example.com/$1 [NC,L,R]

    My play page has play_page.php name in the template and the link finish in namegame.game

    • Reply March 7, 2017 / 14:49 Ivan AtanasovSiteGround Team

      Hello Mirko,

      Instead of making complicated redirects and jumping between HTTP and HTTPS, you can ensure that there will be no mixed content loaded by your site.

      If there are hard coded URLs for external resources loaded by your website, you can simply find them and change the URLs to HTTPS (This is assuming the websites where the content are loading from will allow HTTPS connection)

      This will be much easier and more reliable solution for your website. You will avoid accidental redirect loops and unnecessary delay on the site

* (Required)