Before you begin
Check that the destination URL works and does not redirect back to the original URL.
You can redirect HTTP requests to HTTPS using .htaccess. First ensure that you can view this dotfile in File Manager. Place the rules in the website’s actual document root, often public_html or the relevant subdirectory. Use cPanel File Manager or an appropriate file-transfer client to edit it, keeping a backup of existing rules.
If .htaccess is hidden
If .htaccess is not displayed in cPanel File Manager, follow these steps:
- Sign in to your cPanel account
- Open File Manager.
- Click Settings in the upper-right corner.
- Enable Show Hidden Files in the settings dialog.
5. Click Save. File Manager will now display dotfiles, including .htaccess.
If .htaccess is already visible
If the file is displayed, click Edit and add the following redirect rules only after confirming that HTTPS works and the hosting configuration supports them.
RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Video tutorial
Check the result and troubleshoot
Use a permanent redirect for a lasting change and a temporary one for a test. Check the final destination, the www and non-www versions, and the absence of loops. A web redirect does not change email MX records.
Reference documentation:
Sources accessed on October 11, 2026. Available features depend on your hosting version and options.