All Systems Operational|support@delhihosting.com
cPanel

How to Force HTTPS With .htaccess

26 Mar 2026 Β· 3 min read Β· DelhiHosting Team

Once SSL is active, you want every visitor on the secure https version. A small .htaccess rule redirects all traffic automatically.

Why force it

Without a redirect, people can still reach the insecure http version, which shows "Not Secure" and splits your SEO between two addresses. Forcing https ensures everyone gets the protected, canonical version.

Add the rule

In File Manager, edit the .htaccess file in public_html and add a redirect rule that sends all http requests to https. Place it near the top of the file. Many CMS and caching plugins can also do this for you.

Test it

Visit the http version of a few pages and confirm they jump to https. Check that the padlock shows with no mixed-content warnings, fixing any remaining http resources if needed.

Quick tips
  • βœ“Activate SSL before forcing https
  • βœ“Add the redirect in .htaccess
  • βœ“A plugin can do it on WordPress
  • βœ“Test http pages redirect cleanly
Key takeaway

A short .htaccess redirect forces every visitor onto secure https β€” add it after SSL is active and confirm the padlock shows.

Related cPanel guides

Need a hand with this?

Our Delhi-based engineers handle cPanel, email and server setup for you β€” free migration included.