How to Redirect HTTP to HTTPS using htaccess

To redirect a website from HTTP to HTTPS, you can use the following code in .htaccess file

If you want to redirect HTTP to HTTPS and keep SSL verification pages on HTTP, this is needed on Cpanel servers.

If you wish to add redirect in Apache VirtualHost, use the following VirtualHost entry.

See htaccess

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *