Skip to content
Technology for businesses since 2008

Help center · Security

"Not secure" warning: how to fix SSL problems in WordPress

The “Not secure” warning appears when the browser can’t confirm that the connection to your site is encrypted and that the address really belongs to your site. There are four common causes: the SSL certificate isn’t installed, it has expired, it was issued for another domain, or the site loads parts of the page over HTTP (known as mixed content). Each cause has a different symptom and a different fix, and you can find out which one applies to you in a few minutes.

This article shows you how to identify the problem, fix each case on a WordPress site hosted with cPanel, and check the result. cPanel menu names may vary depending on the version and theme of your hosting panel. If something doesn’t appear under the name mentioned here, look for a similar item or ask support.

What the warning means

SSL (today, technically, TLS) does two things: it scrambles the data exchanged between the visitor and the site so no one in between can read it, and it uses a certificate to prove that the site belongs to who the browser thinks it belongs to. The warning appears when one of these two parts fails.

There are two types of warning, and the difference helps with diagnosis:

  • “Not secure” label in the address bar, but the page opens. Usually the site is on HTTP (no certificate) or has mixed content.
  • Full-screen alert before the site opens (something like “Your connection is not private”). Usually the certificate has expired, belongs to another domain, or isn’t trusted by the browser.

Important: the padlock doesn’t mean the site is trustworthy or free of viruses. It only indicates that the connection is encrypted and the certificate checks out. If the warning you see is about a dangerous site, that’s a different issue, covered in Site marked as dangerous: what to do.

Step 1: find out what the problem is

Open the site in a private (incognito) window to rule out cache and extensions, then follow this table:

What you see Likely cause Go to
“Not secure” label and the address starts with http:// Certificate not installed, or the site doesn’t redirect to HTTPS Step 2 and Step 5
Alert screen mentioning an expired certificate Expired certificate Step 3
Alert screen mentioning a name different from your domain Certificate issued for another domain Step 4
Address in https://, but no padlock, or a padlock with a warning Mixed content Step 6
Site keeps reloading, or shows “too many redirects” Redirect loop Step 7
Only some visitors see the warning Wrong date and time on the device, antivirus, or a network with a filter Step 8

To see the details, click the label next to the address. Most browsers show a link to the certificate, with the domain it was issued for and the start and expiry dates. Note the domain and the expiry date: you’ll need them in the next steps.

Step 2: missing certificate

If the address only opens over http://, the site probably doesn’t have a certificate installed, or it exists but hasn’t been assigned to this domain.

  1. Log in to cPanel and look for the security section.
  2. Look for an item such as SSL/TLS Status, SSL/TLS, or Certificates.
  3. Check whether your domain, and the version with www, show a valid certificate.
  4. At MigraCloud, certificates are issued and renewed automatically through Let’s Encrypt. If there is an option to run cPanel’s automatic certificate check, use it. If the domain still has no certificate, see the causes below or contact support.

If you still need to install a certificate yourself, the step-by-step for each field is in How to install SSL in cPanel.

Step 3: expired certificate

Every certificate has an expiry date. When it passes, the browser blocks access with an alert screen. It’s the most common reason a site “was working fine yesterday.”

  1. Click the alert and check the certificate’s expiry date.
  2. In cPanel, open the SSL/TLS status item and check what it shows for your domain.
  3. If the certificate is issued automatically, find out why renewal failed. The most common reasons are a domain pointing to another server, a redirect or an .htaccess rule that blocks validation, or a recent DNS change.
  4. If the certificate was installed by hand, you need to generate a new one and install it again. The same step-by-step in How to install SSL in cPanel applies here.

If automatic renewal fails and you can’t find the reason, ask your hosting support for help, providing the domain and the date the warning started.

Step 4: certificate issued for another domain

The browser compares the address you typed with the names listed in the certificate. If they don’t match, the alert appears. Typical cases:

  • the certificate covers yourdomain.com, but the visitor accessed www.yourdomain.com, or the other way around;
  • the site was accessed through a subdomain that isn’t on the certificate;
  • the domain was changed or migrated, and the old certificate is still installed;
  • the address was accessed by IP or by the server name, not by the domain.

The fix is to issue or install a certificate that includes all the names your site uses, with and without www. Then check that the domain points to the correct hosting. A domain whose DNS points to another server will show that server’s certificate.

Step 5: force HTTPS in WordPress

With a valid certificate, the next step is making the site always use HTTPS. Without this, anyone who types http:// still sees the version without a padlock.

  1. In the WordPress dashboard, go to Settings > General.
  2. Change the WordPress Address (URL) and the Site Address (URL) from http:// to https://, keeping the rest the same.
  3. Save. WordPress will ask you to log in again.

If the fields are locked (grayed out), the addresses were defined in the wp-config.php file. In that case, make the change there. First, make a copy of the file and of the site: see Website backup: how to do it and check it.

Next, redirect visitors who arrive over HTTP. In cPanel, some panels have an option to force HTTPS on a domain. If your hosting doesn’t have one, the rule can be placed in the .htaccess file in the site’s main folder, above the WordPress block:

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

Make a copy of .htaccess before editing it. A typo in this file takes the site down with a 500 error, and the copy lets you undo the change right away. To find or recreate the file, see WordPress .htaccess: how to find and create the default file.

Step 6: mixed content

Mixed content happens when the page opens over HTTPS, but some image, script, or stylesheet is still loaded over HTTP. The browser removes the padlock or shows the warning even when the certificate is in order. Open the page, press F12, and look at the Console tab: it lists every file loaded over HTTP. Then fix the address where it is stored (database, theme, plugin, or pasted code) and clear the cache.

The full step-by-step is in WordPress without the padlock after installing SSL: how to fix mixed content.

Step 7: redirect loop

After forcing HTTPS, some sites start showing “too many redirects” or “This page isn’t working.” This happens when two rules contradict each other: one sends visitors to HTTPS and another sends them back to HTTP, or the server doesn’t tell WordPress that the connection is already secure.

Check, in this order:

  1. Whether there’s a duplicate redirect rule, for example in .htaccess and also in a plugin.
  2. Whether the addresses under Settings > General use https:// and are consistent between www and non-www.
  3. If you use a CDN or proxy service in front of the site, check the SSL mode configured there. A mode that doesn’t match the server’s certificate is a known cause of loops.
  4. Temporarily deactivate the redirect or SSL plugin, test, and reactivate them one at a time.

If changing .htaccess doesn’t fix it and you no longer know which rule is active, restore the copy you made and ask support for help.

Step 8: when only some visitors see the warning

If the site looks right to you but someone else sees the alert, the problem may be on their side:

  • Wrong date and time on the device. The browser compares the date with the certificate’s validity. A wrong clock can make a valid certificate look expired.
  • Antivirus or security software that inspects secure connections and interferes with the certificate.
  • Corporate network or public Wi-Fi with a filter or a mandatory login page.
  • Very old browser or system that doesn’t recognize the authorities that issue current certificates.

Ask the person to test on another device, on another network, and in another browser. If only one of them shows the problem, that’s the cause.

How to check that it’s fixed

  1. Open https://yourdomain.com and https://www.yourdomain.com in a private window: both should show the padlock, with no alert.
  2. Type http://yourdomain.com and confirm the browser goes to https:// on its own.
  3. Open the homepage, an inner page, a page with images and, if it’s a store, the cart and checkout. The Console should not list mixed content.
  4. Note the certificate’s expiry date and set a reminder to check before then, even if renewal is automatic.

If the site is a store or has a login form, it’s also worth checking that everything still works after the change. And since the site has been changed, updating WordPress carefully helps prevent new problems: see Updating WordPress without taking your site down.

When to contact your hosting or a professional

Ask for help when:

  • certificate renewal fails and you can’t find the reason;
  • the certificate is installed, but the warning remains;
  • the redirect loop persists after you’ve undone your changes;
  • the site has many http:// addresses in the database and you don’t feel safe changing them;
  • the warning appears suddenly, along with other strange signs, such as pages you didn’t create or unexpected redirects.

In the last case, the problem may not be the certificate. See our virus and malware removal page or contact us.

Frequently asked questions

Why does my browser show “Not secure” on my site?

Because the site opens over HTTP, without encryption, or over HTTPS with a problem: an expired certificate, a certificate issued for another domain, or mixed content. Click the label next to the address to see the reason the browser reports.

Does “Not secure” mean my site has a virus?

Not necessarily. The warning is about the connection and the certificate, not the content of the site. A site with a virus can have a padlock, and a clean site can lack one. If the warning is about a dangerous or deceptive site, the case is different and is covered in Site marked as dangerous.

I installed the certificate, but the warning remains. What could it be?

The most common causes are: the site still uses http:// addresses in the WordPress settings, there’s no redirect to HTTPS, mixed content, or an old cache. Follow Steps 5 and 6 and clear all your caches.

My certificate expired. What do I do?

Check the SSL status of the domain in cPanel. If issuance is automatic, find out why renewal failed. If it was manual, generate and install a new one, as shown in How to install SSL in cPanel. If in doubt, contact your hosting support.

Does the certificate cover the domain with and without www?

Only if both names are listed on it. When issuing or checking the certificate, make sure yourdomain.com and www.yourdomain.com are both in the list. If one is missing, a visitor who uses that address will see the alert.

What is mixed content, and how do I find the items?

It’s an HTTPS page that loads some file over HTTP. Open the page, press F12, and check the Console tab: the browser lists each file. Then fix the address in the database, theme, plugin, or pasted code. See the step-by-step in mixed content in WordPress.

Can I change http to https directly in the database?

You can, but do it carefully. Make a backup first and use a search-and-replace tool that handles WordPress serialized data. Editing the text of an exported file can corrupt theme and plugin settings.

After forcing HTTPS, the site showed a redirect error. What now?

Restore the copy of .htaccess you saved and look for duplicate redirect rules, in files or in plugins. Also check the addresses under Settings > General and the SSL mode of any CDN in front of the site.

More on Security

See all →

Help center

Looking for something else?

See all tutorials, organized by topic.