How to Force HTTPS for Your Website Print

  • 0

How to Force HTTPS for Your Website

After enabling SSL, you should force your site to load only on HTTPS to improve security and SEO.

Method 1 — DirectAdmin “Force SSL”

Go to Account Manager → SSL Certificates and enable:
Force SSL with https redirect

Method 2 — .htaccess redirect (LiteSpeed/Apache)

Add this code to your .htaccess file:

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Method 3 — WordPress settings

Inside Settings → General, set:

  • WordPress Address → https://yourdomain.com
  • Site Address → https://yourdomain.com

Common problems

  • Mixed content errors (fix using a plugin like Really Simple SSL)
  • Cloudflare redirect loop (set SSL mode to “Full”)

Was this answer helpful?

« Back