• Go To Website
  • Go To Website
home/Knowledge Base/cPanel/How to redirect HTTP traffic to HTTPS using an htaccess file
Popular Search:Reseller Hosting, VPS Hosting, Professional Mail

How to redirect HTTP traffic to HTTPS using an htaccess file

Updated on April 8, 2022

The below code when added to an htaccess file will automatically redirect any traffic destined for http: to https:

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

Was this helpful?

Yes  No
Related Articles
  • Money-Back Guarantee
  • How to add a sub-domain in the Cpanel Jupiter
  • How to Install WordPress Online Using Softaculous App Installer
  • Enable or Disable PHP’s GD Extension in cPanel
  • Creating MySQL Users and Databases
  • Listed Hosting Nameservers
Leave A Comment Cancel reply

cPanel
  • How to redirect HTTP traffic to HTTPS using an htaccess file
  • Money-Back Guarantee
  • How to add a sub-domain in the Cpanel Jupiter
  • How to Install WordPress Online Using Softaculous App Installer
  • Enable or Disable PHP’s GD Extension in cPanel
  • Creating MySQL Users and Databases
View All 76  
Popular Articles
  • How to Install WordPress Online Using Softaculous App Installer
  • How do I set up my domain’s personal Nameservers?
  • What does “Awaiting release from previous registrar” transfer status mean?
  • Process Of Migration
  • Listed Hosting Nameservers
Categories
  • Databases
  • WordPress
  • Email
  • Domain
    • Transfer
  • SSD Hosting
  • Nameservers
  • Cloud VPS
  • PHP
  • Migration
  • Resellers
  • Security
    • SSL
  • Professional Business Mail
  • Affliates
  • Money-Back Guarantee
  • Billings & Payments
  • Files & Access
  • cPanel
    • Softaculous
  • Backup
  • General

  How to set up email forwarding in cPanel

How to read status information on your account  

  • © 2023. Listed Hosting. All Rights Reserved.

Popular Search:Reseller Hosting, VPS Hosting, Professional Mail