High-Performance Web Hosting

  • SSD Storage
  • Daily Backups
  • 1-click WordPress
  • 24/7 Support

COUPON
hello15

1st Month $1 Only

Get started →

How to redirect http to https SSL using htaccess file

If you want to force or redirect your website visitors from HTTP to HTTPS SSL, add the following mod_rewrite code into your .htaccess file to accomplish this:

RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]


Was this answer helpful?
 Print this Article

Also Read