How to Fix the “Not Secure” Warning and Force HTTPS

To fix a not secure website, first determine whether visitors reach the site over HTTP, receive an HTTPS certificate error, or see insecure files on an otherwise secure page. These problems have different causes. Check the exact address and browser message, then verify DNS and the public endpoint. Install and test certificates for every hostname, update site URLs, remove mixed content, and only then enable one deliberate HTTP-to-HTTPS redirect.
“Not Secure” often means the page was opened with HTTP, which does not encrypt the connection. “Your connection is not private” usually signals an HTTPS certificate-validation problem. A page can also load over HTTPS while requesting files over HTTP; that is mixed content. Chrome distinguishes these states in its security indicators. Fixing the wrong layer can leave the real problem untouched or create a redirect loop.
Start with the exact URL and browser error
Write down the full address that fails, including whether it begins with http:// or https:// and whether it includes www. Test the homepage and one or two important pages in a private window and, if possible, a second browser or network. Note the full browser message and whether the problem affects every visitor or only one device.
This can separate a site-wide problem from a device or network issue. If the error names a certificate date or hostname, investigate TLS before redirects. If the URL is HTTP, confirm the secure version works first. For background on browsers, domains, and servers, see how websites work.
Follow these steps in order
1. Check DNS and the endpoint serving each hostname
List every hostname people and services use, commonly the apex domain such as example.com and the www version. Check their DNS records and confirm that each points to the intended hosting account or CDN. Review both IPv4 and IPv6 records: an outdated address in either can send some visitors to a different server. Also check for an old CDN, load balancer, or hosting binding that still receives traffic.
Even correct DNS can lead to a server bound to the wrong site. Ask your host to confirm each name is attached properly and reaches the expected endpoint. Our web-hosting hub explains hosting basics. Certificate validation methods also differ; see Let’s Encrypt’s challenge-type guide.
2. Install a certificate for every public hostname
Use the certificate setup supported by your host or CDN. It must cover each hostname visitors use, including both apex and www if both are accessible. A certificate for one name does not automatically cover the other. Confirm the HTTPS connection presents the certificate intended for this site, not a default certificate from another virtual host or server.
Check the certificate’s names and validity dates, and make sure the server sends the needed intermediate certificates so browsers can build a trusted chain. Common causes of errors include an expired certificate, a hostname mismatch, an incomplete chain, or a certificate installed at the origin when visitors actually connect to a CDN edge with a different certificate. Let’s Encrypt’s certificate information explains its chain of trust; Mozilla’s TLS guidance outlines secure connection checks.
3. Confirm HTTPS works before forcing it
Open the HTTPS version of the homepage and key pages directly. Check more than the padlock or browser icon: pages should load without certificate warnings, images and styles should appear, and forms or login screens should work. Test both hostname variants separately before choosing which one will be the main address.
With a CDN or reverse proxy, check both connections: visitor-to-edge and edge-to-origin. The edge certificate may be valid while the origin certificate or encryption setting is wrong. Ask which leg is failing. Do not weaken TLS to silence a warning. Cloudflare explains how mode mismatches can create loops in its redirect troubleshooting guide.
4. Update your CMS and site URLs
Once direct HTTPS pages work, update the website’s configured address to use HTTPS. In a content management system, check both the site address and any separate home or canonical URL setting. Update internal links, menus, image URLs, theme settings, and any hard-coded references that still use HTTP. Review canonical tags and the XML sitemap so they point to the HTTPS versions.
For WordPress, follow its official HTTPS setup guidance and your host’s instructions. Behind a reverse proxy, WordPress may misread the visitor’s protocol and loop. Header handling depends on the proxy setup, so use host-specific guidance rather than generic fixes. Google’s site-move guidance covers URL changes; updating URLs does not guarantee rankings.
5. Find and repair mixed content
Open browser developer tools and inspect the Console and Network panels while loading affected pages. Look for blocked or insecure requests beginning with http://. Common sources include old image links, scripts, stylesheets, embedded media, fonts, analytics tags, and third-party widgets. Update each resource to a working HTTPS URL, replace it with a secure equivalent, or remove it if it is no longer needed.
Mixed content is an HTTPS page loading resources through HTTP. Browsers may block active content such as scripts, and other files can also cause warnings or display problems. Do not assume every image is automatically corrected; inspect actual requests. MDN explains mixed-content types and handling.
6. Add one HTTPS redirect, then retest
After HTTPS works, choose the preferred hostname and configure one main redirect layer to send HTTP requests to the matching HTTPS page. Avoid stacking a host redirect, CMS plugin, server rule, and CDN rule without understanding their interaction. Conflicting rules can create chains, send users to the wrong hostname, or loop between HTTP and HTTPS.
Test the HTTP homepage and several deep links. Each should land on the correct HTTPS page, preserving its path and query where appropriate, without extra hops or a loop. Also verify that both www and non-www variants end at the chosen canonical hostname. If an error appears only after enabling redirects, temporarily disable the newest redirect rule and check the proxy/origin scheme handling before adding more rules.
Make HSTS a later hardening step
HTTP Strict Transport Security (HSTS) tells browsers to use HTTPS for future visits and to treat certificate failures more strictly. Consider it only after HTTPS, redirects, renewal, and every required hostname have been tested reliably. The includeSubDomains and preload options can affect hosts that are not ready for HTTPS and can make recovery harder if a certificate or server breaks. Mozilla’s TLS guide describes these tradeoffs. HSTS is not a substitute for fixing the certificate.
Frequently asked questions
Does “Not Secure” always mean the certificate is broken?
No. It can simply mean the page is open over HTTP. A certificate warning on an HTTPS address points to a different problem, such as an expired or mismatched certificate.
Why does the homepage work but a subdomain fail?
Subdomains are separate hostnames. DNS, hosting bindings, and certificates must be configured for each one that should accept HTTPS traffic.
Why do only some visitors see the warning?
Different DNS answers, IPv4 and IPv6 routes, CDN locations, cached redirects, or device trust stores can lead visitors to different outcomes. Compare the exact hostname, address family, and error details.
Will installing a certificate automatically redirect HTTP?
Usually not. A certificate enables HTTPS, while a separate server, host, CMS, or CDN rule handles redirection. First confirm HTTPS works, then add one redirect policy.
Can I turn off mixed-content blocking?
Do not treat browser protections as the fix. Replace insecure resource URLs or remove broken resources so the page and its files use HTTPS.
Do setup steps vary by provider?
Yes. Hosting dashboards, CDN modes, certificate issuance, proxy headers, and redirect controls differ. Use the provider’s current documentation for the actual configuration.
Conclusion
To fix a not secure website safely, identify the exact URL and browser error first, then confirm DNS and the public endpoint. Install and validate certificates for all visitor-facing hostnames, test HTTPS, update site URLs, and clear mixed content before enabling one redirect layer. Retest key pages and redirect paths afterward. If you are following the wider Day 5 SSL series, continue with our guide to a free SSL certificate.




One Comment