You can force a domain to redirect to HTTPS using the "Domains" section in cPanel. This ensures that visitors are automatically redirected from the insecure HTTP version of your site to the secure HTTPS version.
Before you begin
You will need:
A cPanel account with the ability to manage domains.
A valid SSL certificate installed on your domain.
Access to the cPanel interface.
Force a domain to redirect to HTTPS
Log in to your cPanel account.
Locate the Domains section and select Domains.
Find the domain you wish to redirect and click the Manage button next to it.
Scroll down to the Force HTTPS section.
Toggle the Force HTTPS switch to the On position.
Click Save.
Confirm the result
Navigate to your website using the
http://prefix (e.g.,http://example.com).The browser should automatically redirect you to the
https://version of the site.You should see a padlock icon in your browser's address bar, indicating a secure connection.
Limitations
This feature requires a valid SSL certificate to be active on the domain. If no certificate is installed, the browser will display a security warning instead of redirecting to a secure page. This setting applies to the specific domain selected in the cPanel interface.
