How do I force HTTPS?
21 viewsHow do I force HTTPS?
Overview
Forcing HTTPS ensures that all visitors automatically use the secure version of your website (https://). This improves security, builds trust, and is recommended for SEO.
Before You Start
Make sure:
- An SSL certificate is already installed on your domain
- Your website loads correctly using
https://yourdomain.com
Method 1 – Force HTTPS using WordPress (Recommended)
-
Log in to your WordPress dashboard
yourdomain.com/wp-admin
-
Go to Settings → General
-
Update both of these fields:
- WordPress Address (URL):
https://yourdomain.com - Site Address (URL):
https://yourdomain.com
- WordPress Address (URL):
-
Save changes
Method 2 – Force HTTPS using .htaccess (Advanced)
- Log in to DirectAdmin File Manager
- Open the public_html folder
- Edit the file named .htaccess
- Add the following code at the top:
RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
- Save the file
Method 3 – Use a WordPress plugin (Easy option)
You can also install a plugin such as:
- Really Simple SSL
Steps:
- Go to Plugins → Add New
- Search for the plugin
- Install and activate it
- Follow the setup wizard
Important Notes
- Always install SSL before forcing HTTPS
- Incorrect .htaccess changes can break your site
- Clear browser cache after making changes
- Mixed content (HTTP images/scripts) may still appear until fixed
Common Issues & Fixes
Website shows “Not Secure” after forcing HTTPS
- Clear cache
- Check SSL is properly installed
- Fix mixed content warnings
Redirect loop error
- Remove duplicate redirect rules in .htaccess
- Disable conflicting plugins
Some pages still load HTTP
- Update internal links in WordPress settings or database
Need Help?
If you need help enabling HTTPS or fixing mixed content issues, our support team can check your configuration and secure your website properly.