India English
Kenya English
United Kingdom English
South Africa English
Nigeria English
United States English
United States Español
Indonesia English
Bangladesh English
Egypt العربية
Tanzania English
Ethiopia English
Uganda English
Congo - Kinshasa English
Ghana English
Côte d’Ivoire English
Zambia English
Cameroon English
Rwanda English
Germany Deutsch
France Français
Spain Català
Spain Español
Italy Italiano
Russia Русский
Japan English
Brazil Português
Brazil Português
Mexico Español
Philippines English
Pakistan English
Türkiye Türkçe
Vietnam English
Thailand English
South Korea English
Australia English
China 中文
Canada English
Canada Français
Somalia English
Netherlands Nederlands

How to Force HTTPS on WordPress: Step-by-Step Guide

Buy domains, business emails, hosting, VPS and more: Get Started

When you force HTTPS on WordPress, every visitor who types or clicks an old HTTP address lands on the secure version of your site instead. 

That small change affects how visitors experience your website, because it decides whether their connection is protected or exposed.

HTTP sends website data without the encryption that HTTPS provides. 

HTTPS uses TLS encryption to protect the data traveling between the visitor’s browser and your website, which covers login details, form entries and the pages themselves. 

Browsers also flag unencrypted sites as Not secure, which can make visitors hesitate before they read or buy anything.

To force HTTPS on WordPress, you set up a redirect from http://example.com to https://example.com. 

A good redirect also preserves the requested page path, so a visitor who opens an old link reaches the matching secure page rather than the homepage. 

Here is how that looks in practice:

BeforeAfter
http://example.comhttps://example.com
http://example.com/abouthttps://example.com/about
http://www.example.com/contacthttps://www.example.com/contact

Keep one limit in mind. 

HTTPS protects the connection, but it does not automatically make a WordPress website safe from malware, weak passwords or vulnerable plugins. 

You still need strong passwords, updated software and regular backups.

This guide covers four ways to force HTTPS on WordPress: cPanel, WordPress settings, a plugin and the .htaccess file.

What You Need Before Forcing HTTPS on WordPress

What You Need Before Forcing HTTPS on WordPress

Check these items before you change any settings:

  • A domain name connected to your hosting account. The domain must already point to the server that runs your WordPress site.
  • A valid SSL/TLS certificate installed for the domain. Without one, a redirect has nothing secure to send visitors to.
  • Access to the WordPress dashboard. You need an administrator login.
  • Access to the hosting control panel or website files, if you plan to use server-level redirects.
  • A recent backup of the website. A backup lets you recover quickly if a setting locks you out.

The SSL certificate must cover the hostname visitors actually use. 

If your website uses www, the certificate has to include www.example.com as well as example.com. 

A certificate issued for only one version will trigger warnings on the other.

Important: Do not enable redirects before confirming that HTTPS loads correctly. Open https://example.com in your browser first. If it shows a certificate warning or a broken page, fix the certificate before you force HTTPS on WordPress. Otherwise, visitors may encounter SSL errors or redirect problems.

Method 1: Force HTTPS on WordPress Through cPanel

This method is recommended for Truehost cPanel users. 

cPanel includes a built-in Force HTTPS Redirect option for domains that have a valid SSL certificate. 

And it works at the server level, so it applies to the whole domain without any file editing.

Step 1: Log In to cPanel

login to cpanel
  1. Sign in to your hosting account’s cPanel.
  2. Locate the Domains section.
  3. Open the Domains interface.

Step 2: Enable Force HTTPS Redirect

Force HTTPS on WordPress Through cPanel
  1. Find the domain you want to secure in the list.
  2. Locate the Force HTTPS Redirect toggle beside it.
  3. Switch it on, provided the domain has a valid SSL certificate.
  4. Save or confirm the setting if cPanel prompts you.

Step 3: Test the Redirect

  1. Open a private browser window, which avoids cached redirects.
  2. Enter the HTTP version of your domain.
  3. Confirm that the browser loads the HTTPS version.
  4. Visit a few internal pages and check that their paths are preserved.

The cPanel option may not appear if the domain does not have a valid SSL certificate. 

In that case, install or renew the certificate first. 

Addon domains may also require you to enable the setting on their associated subdomains, depending on your cPanel configuration.

Method 2: Force HTTPS Through WordPress Settings

You can also update your website URLs directly from the WordPress dashboard. 

This tells WordPress to build every link with HTTPS.

Step 1: Open WordPress General Settings

  1. Log in to the WordPress dashboard.
  2. Navigate to Settings → General.

Step 2: Update the WordPress URLs

Force HTTPS Through WordPress Settings

Change both address fields to use HTTPS:

SettingBeforeAfter
WordPress Address (URL)http://example.comhttps://example.com
Site Address (URL)http://example.comhttps://example.com

The two settings do different jobs.

The WordPress Address specifies where your WordPress core files are located. 

The Site Address specifies the URL visitors use to reach your website. For most sites both should carry the same HTTPS address.

Step 3: Save Changes and Test

  1. Save the updated settings.
  2. Log in again if WordPress asks you to.
  3. Open the website using its HTTP address.
  4. Confirm that the HTTPS version loads.

Changing these two settings alone does not guarantee that every HTTP request will redirect to HTTPS. 

The hosting server must also be configured to redirect HTTP traffic. 

Treat this method as one half of the job, and pair it with the cPanel option above or one of the methods below to force HTTPS on WordPress completely.

Method 3: Force HTTPS Using a WordPress Plugin

A plugin is useful when you would rather not edit website files. 

It handles the configuration from inside the dashboard, which suits site owners who are not comfortable with server settings.

Force HTTPS Using a WordPress Plugin

Step 1: Choose an SSL Plugin

Really Simple Security is one plugin you can consider. 

Plugin features and requirements change over time, so open the plugin’s directory page and confirm that its current version still includes HTTPS redirection before you rely on it.

Step 2: Install and Configure the Plugin

  1. Open Plugins → Add New Plugin.
  2. Search for your chosen SSL plugin.
  3. Install and activate it.
  4. Follow its setup instructions.
  5. Enable HTTPS redirection, if the current version supports it.

Step 3: Test Your Website

  1. Open the HTTP version of the website.
  2. Confirm that it redirects to HTTPS.
  3. Check the WordPress dashboard and important pages.
  4. Look for mixed-content warnings, which appear when a secure page still loads some files over HTTP.

A plugin is not a substitute for installing a valid SSL certificate. 

It can redirect traffic, but it cannot create the certificate your browser checks. 

Confirm the certificate first, then use the plugin to force HTTPS on WordPress.

Method 4: Force HTTPS Using the .htaccess File

This method suits websites running on Apache servers that support .htaccess rules. 

It gives you direct control over the redirect, but a typing mistake can take a site offline, so work carefully.

How to force HTTPS using the htaccess file

Step 1: Open Your Website Files

  1. Log in to cPanel.
  2. Open File Manager.
  3. Navigate to the WordPress installation directory, commonly public_html.
  4. Enable hidden files if .htaccess is not visible.

Step 2: Back Up the .htaccess File

Download or copy the original .htaccess file before you edit it. 

If the new rule causes an error, you can restore the copy and bring the site back within a minute. 

Skipping this step is the most common reason a small edit turns into an outage.

Step 3: Add the HTTPS Redirect Rule

Add this example near the top of the file:

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

Each line has a job:

  • RewriteEngine On enables URL rewriting.
  • RewriteCond %{HTTPS} off checks whether the request is not using HTTPS.
  • RewriteRule redirects the requested URL to its HTTPS equivalent, keeping the host name and the page path.
  • R=301 indicates a permanent redirect, and L stops processing further rules.

Keep any existing .htaccess rules in place, including the block WordPress writes for its permalinks. 

The position of the redirect can affect how other rules behave, which is why placing it above the WordPress block is the usual choice.

Step 4: Save and Test the Redirect

  1. Save the updated file.
  2. Open the HTTP version of the website.
  3. Check that the HTTPS version loads.
  4. Test internal pages and any existing redirects.

Important: Do not combine multiple independent redirectrules without checking how they interact. cPanel, plugins and .htaccess can conflict if several methods are configured at the same time. Pick one primary method to force HTTPS on WordPress, and test after every change.

How to Check Whether HTTPS Is Working on WordPress

How to Check Whether HTTPS Is Working on WordPress

Once you force HTTPS on WordPress, confirm that the configuration works from the visitor’s side:

  • Enter the HTTP version of the domain and check whether it redirects.
  • Confirm that the final URL begins with https://.
  • Test the homepage and several internal pages.
  • Check that the browser does not show certificate warnings.
  • Use an SSL checker to verify that the certificate is valid.
  • Inspect important pages for mixed-content warnings.

Use this short table as a checklist:

TestExpected result
HTTP homepageRedirects to HTTPS
HTTP internal pageRedirects to matching HTTPS page
SSL certificateValid and not expired
Browser security indicatorNo certificate warning
Images and scriptsLoad over HTTPS

Common Problems When Forcing HTTPS on WordPress

ProblemPossible causeWhat to check
Too many redirectsConflicting redirect rulesCheck cPanel, plugin and .htaccess settings
SSL certificate errorCertificate missing, expired or issued for another hostnameCheck certificate installation and domain coverage
Mixed content warningsImages, scripts or styles still load over HTTPUpdate old HTTP resource URLs
WordPress dashboard inaccessibleIncorrect WordPress or Site Address URLRestore the correct URLs
Force HTTPS toggle unavailableSSL is not installed or validInstall or renew the certificate
Website still loads over HTTPRedirect rule is missing or not appliedCheck server-level redirect configuration

Most of these problems trace back to a missing certificate or to two methods fighting each other. 

If you see a redirect loop, disable all but one method, clear your browser cache and test again.

Enable HTTPS on Your WordPress Website With Truehost

A valid SSL certificate and correctly configured redirects are both needed to serve a WordPress website over HTTPS. 

The certificate secures the connection, and the redirect makes sure every visitor uses it.

Truehost WordPress hosting is an option for anyone who wants to run a self-managed WordPress website. 

Before you buy, review the current US plan details to confirm which features each plan includes, such as automated SSL, cPanel access and WordPress installation options. 

Those tools make it simpler to force HTTPS on WordPress without extra software.

Explore our WordPress hosting plans and get the hosting tools you need to set up your website with HTTPS.