How to Force HTTPS on Your Website

Once your site has an SSL certificate, every visitor should be sent to the secure https:// version automatically. This guide shows you how to force HTTPS on a website hosted with Instant Access Internet Services using the Force HTTPS Redirect switch in cPanel, with an .htaccess option and WordPress tips if you need them.

Before you start: check your SSL certificate

Your domain gets a free SSL certificate automatically through AutoSSL, as long as it points to our nameservers. Make sure it's active before forcing HTTPS, or visitors will see a security warning.

  1. In cPanel, go to Security > SSL/TLS Status.
  2. Check that your domain and www. version show a valid certificate.
  3. If they don't, see Free SSL Certificates: How AutoSSL and SSL/TLS Status Work. A new domain can take a few hours to get its certificate after DNS starts pointing to us.

How to force HTTPS in cPanel (easiest)

  1. In cPanel, go to Domains > Domains.
  2. Find your domain in the list.
  3. In the Force HTTPS Redirect column, click the switch so it turns On.

That's it. Anyone who visits http://example.com is now sent to https://example.com. To undo it, click the switch again to turn it off.

If the switch is greyed out or missing, the domain doesn't have a valid SSL certificate yet. Fix that first (see above).

WordPress: update your site address

If your site runs WordPress, also tell WordPress to use HTTPS, otherwise pages can load with broken styling or a "Not Secure" warning.

  1. Log in to WordPress admin and go to Settings > General.
  2. Change both WordPress Address (URL) and Site Address (URL) so they start with https://.
  3. Click Save Changes and log in again.

If images or scripts inside your pages still load over http://, the browser will show a mixed content warning. See How to Fix "Not Secure" Warnings and Mixed Content Errors for how to fix that.

Alternative: force HTTPS with .htaccess

If you'd rather control the redirect yourself, or you also want to choose www or non-www in the same step, use an .htaccess rule instead of the switch. Don't use both at once.

  1. In cPanel, go to Files > File Manager and open public_html.
  2. If you can't see .htaccess, click Settings, tick Show Hidden Files (dotfiles) and click Save.
  3. Right-click .htaccess and choose Edit.
  4. Add these lines at the very top of the file, above any # BEGIN WordPress section:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [L,R=301]
  1. Click Save Changes.

To also pick www or non-www in the same redirect, use the rules in WWW or Non-WWW: How to Redirect Your Domain instead.

Test it

Open a private/incognito window and type http://example.com (with your own domain). The address bar should change to https:// and show a padlock.

Troubleshooting

"Too many redirects" after turning on HTTPS

  • If you used both the Force HTTPS Redirect switch and an .htaccess rule, remove one of them.
  • Check Domains > Redirects for an old redirect pointing back to http://, and delete it.
  • If a WordPress plugin also forces HTTPS, check its settings.
  • If you use Cloudflare, set its SSL/TLS mode to Full or Full (strict), not Flexible.

The padlock is missing even though the address starts with https

That's almost always mixed content: something on the page is still loading over http://. See How to Fix "Not Secure" Warnings and Mixed Content Errors.

Does forcing HTTPS affect my email or cPanel login?

No. It only affects visitors to your website.

Related guides

Still stuck? Open a support ticket and the Instant Access Internet Services team will help.

Ultrafast LiteSpeed hosting from InstantAccess.net: free SSL, free backups, cPanel included, no contracts. Check out our $10/month hosting.
  • force https cpanel, redirect http to https, force https redirect, htaccess https redirect, wordpress force https, cpanel ssl redirect
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to Use Microsoft 365 or Google Workspace Email with Your Domain

You can keep your website with us and use Microsoft 365 (Outlook) or Google Workspace (Gmail) for...

Our Nameservers: How to Point Your Domain to Your Hosting

To make your website and email work on your hosting account, your domain has to point to the...

DNS Propagation: Why Domain Changes Take Time and How to Check

When you change your nameservers or edit a DNS record, some people see the change right away...

How to Set Up Dynamic DNS in cPanel

Dynamic DNS (DDNS) lets you reach a device on a home or office connection, such as a camera, NAS...

Free SSL Certificates: How AutoSSL and SSL/TLS Status Work

Every hosting account includes free SSL certificates, so your website loads over HTTPS with a...