How to Fix “Not Secure” in WordPress: SSL, HTTPS and Mixed Content
Remove the “Not secure” warning in WordPress: install free SSL, switch the site address to https, add a 301 redirect and fix mixed content safely.

Quick answer: To remove “Not secure”, install an SSL certificate from your hosting panel (cPanel’s AutoSSL or Let’s Encrypt), change both addresses in Settings → General to https://, redirect all http:// traffic to https://, and replace old http:// links in the database with a search-and-replace tool to fix mixed content.
Chrome shows “Not secure” next to your address when a page loads over plain http://. Even after you install SSL, the padlock can stay missing if some images or scripts still load over http://. This is called mixed content. This guide fixes both problems, in the right order, without breaking your site.
Step 1: Install an SSL certificate
Most hosts include free certificates from Let’s Encrypt or a similar authority.
- cPanel: open SSL/TLS Status, tick your domain (and the
wwwversion), and click Run AutoSSL. A green padlock icon next to the domain means a certificate is installed. - Other panels: look for “SSL”, “Let’s Encrypt” or “Security” in your hosting dashboard.
- Cloudflare users: set SSL/TLS mode to Full (strict) once the origin server has a valid certificate. “Flexible” mode can cause redirect loops with WordPress.
Test it by opening https://yourdomain.com. If the browser shows a certificate warning, the certificate is not installed yet; wait for AutoSSL to finish or ask your host.
Step 2: Back up before changing addresses
The next steps change your site address and database. Take a full backup first, as shown in our free WordPress backup guide.
Step 3: Change the WordPress and site address to https
Go to Settings → General and change both WordPress Address (URL) and Site Address (URL) from http:// to https://. Save. WordPress logs you out; log in again at the https:// address.
If the two fields are greyed out, they are set in wp-config.php with WP_HOME and WP_SITEURL. Edit those lines there instead.
Step 4: Redirect all http traffic to https
Old links and bookmarks still point to http://. A permanent 301 redirect sends visitors and Google to the secure version. Many hosts have a “Force HTTPS” switch (in cPanel, check Domains for a “Force HTTPS Redirect” toggle). If yours does not, add this at the top of the .htaccess file in your site’s root folder on an Apache or LiteSpeed server:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Keep the existing # BEGIN WordPress block below it unchanged. Then test: http://yourdomain.com/any-post/ should land on the https:// version of the same post.
Step 5: Find mixed content
If the padlock is still missing on some pages, open the page in Chrome, press F12 and select the Console tab. Lines starting with “Mixed Content” name each file still loading over http://. Usually they are:
- images inserted into posts before the switch,
- logo or background images set in the theme customizer or page builder,
- scripts or fonts added by an old plugin or by code in a header/footer plugin.
Step 6: Replace old http links in the database
Old links are stored in your posts and settings. Replace them in one go with a tool that handles WordPress’s serialized data safely, such as the free Better Search Replace plugin:
Install and open the tool
Install Better Search Replace and open Tools → Better Search Replace.
Enter the addresses
Search for http://yourdomain.com and replace with https://yourdomain.com. If your site uses www, run it again for the www version.
Do a dry run first
Select all tables, keep “Run as dry run” ticked and click Run. Check the number of changes looks sensible, then untick dry run and run it for real.
Clear caches
Clear your caching plugin’s cache and, if you use one, the CDN cache. If you use Elementor, also open Elementor → Tools and use Regenerate CSS & Data.
Do not use a plain SQL “UPDATE … REPLACE” query on the options or postmeta tables. WordPress stores some settings as serialized data with string lengths, and a plain replace can corrupt them. The plugin above, or WP-CLI’s wp search-replace, handles this correctly.
Step 7: Tell Google about the change
If you use a Domain property in Search Console, nothing changes; it already covers https://. If you use a URL prefix property, add a new one for the https:// address and submit your sitemap there. Our Search Console setup guide covers both.
Frequently asked questions
Is HTTPS a Google ranking factor?
Yes, HTTPS is a lightweight ranking signal, and Chrome labels http pages as “Not secure”, which puts visitors off. HTTPS also protects logins and contact-form data.
Do I need a paid SSL certificate?
No. Free certificates from Let’s Encrypt give the same encryption and padlock as paid domain-validated certificates. Paid certificates mainly add support or warranty.
Should I use a plugin like Really Simple Security instead?
A plugin can handle redirects and some mixed content automatically, which is fine as a quick fix. Fixing the address, redirect and database directly, as above, means the site keeps working even if the plugin is removed.
My site shows “too many redirects” after switching. What happened?
Usually two redirects fight each other, for example Cloudflare in Flexible mode plus an https redirect on the server. Set Cloudflare to Full (strict), or remove one of the redirects, then clear caches.
Sources
- HTTPS for WordPress (WordPress Developer Resources)
- Mixed content and HTTPS (Chrome for Developers)
- Site moves with URL changes (Google Search Central)