In the Domains interface in cPanel (Home >> Domains), there’s an option to enable Force HTTPS Redirection from the insecure version (HTTP) to the secure version (HTTPS) with a toggle switch. This information is stored in the account’s user data files (/var/cpanel/userdata), and the redirection is built into the domain’s vhost configuration.
Learn more:
https://cpanel.net/blog/products/force-https-redirection/