With the .htaccess file
The .htaccess is a simple text file simply called ‘.htaccess’ which contains additional settings passed to the web server to support some more complicated functionality. To force redirection through .htaccess file it must be in /htdocs/ folder of your domain, if it is not there already, create one, then paste text below into it and save file, your website will start using https protocol
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
With Cloudflare Settings
If you use Cloudflare you can redirect traffic to https with it, go to SSL/TLS > Edge Certificates > Always Use HTTPS and enable this feature.