An HTTPS canonical issue occurs when your WordPress homepage is available at an HTTP URL, does not redirect to HTTPS, or outputs a canonical URL that points to the wrong protocol. For example, http://example.com/ may load separately from https://example.com/, while the page’s canonical tag still references HTTP.
In this guide
Fixing this safely requires more than adding a canonical tag. You need to confirm the preferred site URL, configure one HTTP-to-HTTPS redirect, check the canonical output, and clear any caches that may be serving old HTML.
What the HTTP-to-HTTPS canonical problem means
HTTPS and HTTP are different URL versions even when they display the same homepage. Search crawlers, browsers, caching layers, and analytics tools can treat them as separate addresses when the server does not clearly identify HTTPS as the preferred version.
A healthy setup normally has this behavior:
http://example.com/returns a permanent redirect tohttps://example.com/.https://example.com/returns a successful page response.- The HTTPS homepage contains one self-referencing canonical tag pointing to
https://example.com/. - Internal links, XML sitemaps, and site settings use HTTPS.
The domain may include www or omit it. That choice is fine as long as one version is consistently preferred and every alternate version redirects to it.
Check which URL version WordPress should use
Before changing redirects, decide whether your preferred homepage is https://example.com/ or https://www.example.com/. Do not switch between versions during troubleshooting.
Review the WordPress address settings
- Sign in to WordPress and open Settings → General. Exact labels can vary slightly by WordPress version.
- Check WordPress Address (URL) and Site Address (URL).
- Make sure both use the same HTTPS protocol and the same preferred hostname.
- Save the settings if they are incorrect.
If you cannot access the dashboard, the values may be defined in wp-config.php. Look for existing WP_HOME and WP_SITEURL definitions. Do not add duplicate definitions. If these constants are controlled by your host or deployment system, update the source configuration instead of repeatedly changing the database.
define( 'WP_HOME', 'https://example.com' );
define( 'WP_SITEURL', 'https://example.com' );
Replace the domain with your actual preferred hostname. Do not copy this example if your site uses www.
Test the HTTP redirect before changing plugins
Open the HTTP homepage in a private browser window, or test it with a redirect checker. It should make one clean move to the HTTPS homepage. A chain of several redirects is less reliable and can expose conflicts between WordPress, the hosting server, a CDN, and a security plugin.
From a terminal, you can inspect response headers with:
curl -I http://example.com/
Look for a 301 or another permanent redirect and a Location header pointing to the exact HTTPS homepage. Then test the destination:

curl -I https://example.com/
The HTTPS response should not redirect back to HTTP. If it does, stop and resolve the protocol conflict before editing canonical tags.
Configure one server-side HTTP-to-HTTPS redirect
The safest redirect is normally configured at the web server or hosting layer, before WordPress loads. Your hosting control panel may provide an option named Force HTTPS, HTTPS Redirect, or SSL/TLS redirect. Use one authoritative method rather than enabling several overlapping redirect systems.
Apache and .htaccess
On Apache hosting, an HTTP-to-HTTPS rule may look like this:
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://example.com%{REQUEST_URI} [R=301,L]
Place the rule only where your hosting configuration expects it, and replace the hostname with your preferred domain. Some hosts handle SSL termination at a proxy, so %{HTTPS} may not reflect the visitor’s original protocol. In that situation, ask the host for the correct rule rather than guessing.
Do not replace the complete WordPress section in .htaccess with a random snippet. A malformed file can cause server errors or break permalinks. If you are already seeing 500 errors or unusual redirects, review this .htaccess troubleshooting guide before making additional changes.
CDN or reverse proxy setups
When Cloudflare or another reverse proxy sits in front of WordPress, the proxy and origin server must agree about HTTPS. A flexible or mismatched SSL mode can make the origin believe requests are HTTP while visitors use HTTPS. This often creates loops, incorrect canonical URLs, or inconsistent redirects.
Check the CDN’s SSL mode, origin certificate, page rules, and redirect settings. If the site is already trapped in a loop, follow the focused WordPress SSL and Cloudflare redirect-loop guide.
Correct the canonical tag without creating duplicates
After the redirect works, view the source of the HTTPS homepage and search for rel="canonical". There should generally be one canonical link, and its URL should match the final HTTPS hostname.
<link rel="canonical" href="https://example.com/" />
Most WordPress SEO plugins generate canonical tags automatically from the site URL and page settings. Change the canonical through the plugin that owns it instead of inserting a second tag in a theme file, header plugin, or custom code block.
Common causes of a wrong or missing HTTPS canonical include:
- WordPress Address and Site Address still use HTTP.
- An SEO plugin has a manually overridden homepage canonical.
- A theme or custom plugin prints its own canonical tag.
- A cached HTML page was generated before the SSL migration.
- The site uses both
wwwand non-wwwURLs inconsistently. - A staging, migration, or development setting was copied into production.

If you find two canonical tags, do not simply delete one at random. Identify which plugin, theme, or integration outputs each tag. The guide to broken canonical tags and duplicate URLs explains how to trace those conflicts safely.
Clear caches and regenerate URL-based files
A correct setting can appear broken when an old page is cached. Purge, in order where applicable:
- Your page-cache plugin.
- Your hosting or server cache.
- Your CDN cache.
- Your browser cache or private browsing session.
Regenerate the XML sitemap through your SEO plugin if it contains HTTP URLs. Also inspect navigation menus, logo links, image URLs, stylesheet URLs, and hard-coded links in theme templates or widgets. Mixed internal URLs may not stop the redirect, but they can preserve inconsistent signals and trigger browser warnings.
Verify the complete URL path
Test more than the homepage. Check an ordinary post, a page, a category archive, and a URL with a query string if your site uses one.
- HTTP versions redirect to the matching HTTPS URL.
- HTTPS pages remain on HTTPS.
- The redirect does not remove necessary paths or parameters.
- The final page has one canonical tag.
- The canonical matches the final URL’s protocol and hostname.
- Internal links and the sitemap use the preferred version.
Use your browser’s developer tools or a command-line request to inspect the final destination. If the canonical looks correct in the browser but an auditing tool still reports HTTP, allow time for the tool to recrawl the page and make sure it is not reading a cached response.
What not to do
- Do not add multiple canonical tags. Search engines may ignore conflicting signals.
- Do not redirect HTTPS back to HTTP to accommodate an old plugin or theme.
- Do not enable redirects in several places blindly. WordPress, the server, CDN, and plugins can create loops.
- Do not edit the database directly without a current backup and a clear rollback plan.
- Do not use a canonical tag as a substitute for a redirect. A canonical expresses preference; it does not prevent the alternate URL from loading.
When professional help is safer
Get assistance if you cannot access the dashboard, the host controls SSL termination, redirects behave differently for logged-in users, or the site alternates between www and non-www. These symptoms often involve server rules, caching, DNS, or plugin output at the same time.
WP Fix It can investigate the configuration through its WordPress Site Repair service. Before making changes, create a backup and record the current redirect and canonical behavior so the working state can be restored if necessary.
Final verification checklist
Use this short checklist after the changes:
- Both WordPress URL settings use the preferred HTTPS hostname.
- The HTTP homepage permanently redirects to HTTPS in one step.
- The HTTPS homepage loads without a redirect loop.
- Only one canonical tag appears in the page source.
- The canonical points to the final HTTPS homepage.
- The sitemap and internal links use HTTPS.
- Page, host, CDN, and browser caches have been cleared.
- Representative posts and pages pass the same checks.
For broader WordPress configuration guidance, consult the official WordPress Documentation. Once the redirect, site settings, and canonical output agree, the HTTP-to-HTTPS problem is resolved at its source rather than hidden with another tag.



