How can I redirect http to https?

Avatar
  • updated
  • Answered

I do have a free security certificate activated, but I am wondering if there is any way for me to automatically redirect people who arrive at the http:// site to the https:// UTL.

Duplicates 3
Redirect HTTPS to HTTP on a VPS account
An older version of one of our sites used HTTPS. The current version does not. Some people still have our old links, however. How do we redirect people who visit using https://domain.com/* to http://www.domain.com/*
How can I remove my http site since i have a https site
redirect to HTTPS is not working.

your redirect is not working or not properly setup. When I go through redirect it shows too many redirected, clear cookies.

Avatar
IMH Support Agent 2
  • Under review

Hello Seanature,

Thanks for the question about redirecting your visitors from http to https.  This can be done through your .htaccess file.  Follow this tutorial to learn how make this change. If you have any further questions or comments, please let us know.


Kindest regards,

Arnel C.

Avatar
BradM

Hi thenorrisgroup,

Option 1. If you will keep your SSL Certificate

We have an article here on how to force https, however you're actually trying to do the opposite.

You can take that example code and modify is slightly so that it forces https to http:

RewriteEngine On RewriteCond %{SERVER_PORT} 443 RewriteRule ^(.*)$ https://www.yourdomain.com/$1 [R,L]

You will simply need to add the above code to your .htaccess file.

Option 2. You will be canceling / not renewing your SSL certificate.

After much research, I've learned that the SSL connection is made before Apache can process any rewrite rules. What this means is that if you don't have a valid ssl certificate, your user's browser will issue them some type of SSL Warning before Apache will even force the https to http redirect.

Without an SSL certificate, you will not be able to force https to http.

I hope this helps answer your question. If you have any further questions, feel free to update your question or post a comment on this page.

Did you know with a VPS you can modify your Apache settings to how you want it setup? Click here to learn more about what make InMotion Hosting a great VPS solution.

Thanks!

- Brad