Skip to content
Related Articles
Open in App
Not now

Related Articles

How to redirect https to HTTP URL through .htaccess ?

Improve Article
Save Article
  • Last Updated : 17 Nov, 2022
Improve Article
Save Article

Hyper Text Transfer Protocol Secure (HTTPS) is the secure version of HTTP, the protocol over which data is sent between your browser and the website that you are connected to. The ‘S’ at the end of HTTPS stands for ‘Secure’. It means all communications between your browser and the website are encrypted.

A Uniform Resource Locator (URL) is a unique identifier used to locate a resource on the internet. It is also referred to as a web address. URLs consist of multiple parts — including a protocol and domain name — that tell a web browser how and where to retrieve a resource.

What is .htaccess?

Htaccess is short for Hypertext Access. It is a configuration file used by apache-based web servers. Configuration files configure the initial settings of a program or the server. This means that the .htaccess file can be used to make the server behave in a certain way. Each function is basically just a line of text, or code, which tells the server what to do. You can add or change functionality by adding or changing the code in the .htaccess file.

Redirecting your domain from HTTPs to HTTP using .htaccess in cPanel.

1. Log into cPanel.

2. Click the File Manager icon.


3. At the top right, click the Settings button.


4. Check the Show Hidden Files (dotfiles) box and click Save 


5. Now you have to locate the .htaccess file for the website you want to apply the redirect to.  In most cases, it will be located in the public_html folder, so we will double-click that.


6. Find your .htaccess file, right-click it and click Edit


7. Now at the top of the file, copy and paste the following code:

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


8. Lastly click Save Changes at the top right.


If someone visits your website using “https://” they will be redirected to “http://”

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!