Why Force HTTPS?

After installing SSL, your site is accessible via both http:// and https://. You should force all visitors to use HTTPS for security and SEO.

Method 1: DirectAdmin Setting

  1. Log in to DirectAdmin
  2. Go to Domain Setup (or Domain Management)
  3. Select your domain
  4. Enable Force SSL with HTTPS redirect
  5. Save

Method 2: .htaccess (Apache/nginx)

Create or edit the .htaccess file in your public_html folder:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTPHOST}%{REQUESTURI} [L,R=301]

Method 3: In Your Application

Most CMS platforms (WordPress, etc.) have settings to force HTTPS:

  • WordPress: Go to Settings → General and change both URLs to https://

Verify It Works

After enabling, test by visiting http://example.com — it should automatically redirect to https://example.com.