HostKarle Support

How to redirect http to https using htaccess

Redirect http to https using htaccess

Redirect http to https using htaccess if you want to secure your website you must have to install SSL certificate

You may also like: How to Install SSL Certificate

Follow below step to redirect your website to https :-

Step1. Login to Cpanel

 

Step2. Go to Public_html Folder

 

Step3. Create .htaccess File

 

Step4. Edit htaccess File

 

Step5. Enter Below Code in .htaccess file and save

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

 

if you already have .htaccess file in your cpanel do not duplicate.RewriteEngine On

admin

Share
Published by
admin

Recent Posts

How to Move WordPress From Localhost to a Live Server

Learn how to move wordpress from localhost to live server: export XAMPP files and database,…

2 hours ago

What Happens When a Domain Expires?

Learn what happens when a domain expires, how grace and redemption periods work, what recovery…

13 hours ago

Best HostLelo Alternatives for Indian Websites (2026)

Compare HostLelo alternatives for Indian websites on renewal price, panels, email, SSL, backups, UPI payments…

19 hours ago

Wix vs WordPress for Indian Small Businesses

Compare wix vs wordpress for Indian small businesses: 3-year rupee cost, beginner ease, UPI/Razorpay payments,…

1 day ago

How to Transfer a Domain to Another Registrar

Learn how to transfer domain to another registrar: check the 60-day rule, unlock it, use…

2 days ago

DirectAdmin Backup: How to Back Up and Restore Your Site

Learn how to create a directadmin backup, download it off-server, and restore website files, databases,…

2 days ago

This website uses cookies.