In short
Ahrefs flags "Canonical from HTTPS to HTTP" when an HTTPS page has a canonical tag pointing to its HTTP version. Google generally prefers HTTPS as canonical, so this sends a conflicting signal toward the insecure URL. Change the canonical to HTTPS and redirect HTTP to HTTPS across the site.
Of the two HTTP/HTTPS canonical issues, this is the one that matters. Here your secure page tells search engines the insecure copy is the original.
Why it matters
Ahrefs points out that HTTPS is a ranking factor, so secure pages should be the canonical. Google also says some signals can push it toward HTTP even on an HTTPS site: invalid certificates, HTTPS-to-HTTP redirects, and HTTP URLs in sitemaps or hreflang. A canonical to HTTP adds to that pull.
Where it comes from
The site moved to HTTPS, but the CMS's base URL setting still says http.
Canonicals are hardcoded in a template from before the move.
A CDN or proxy handles SSL, and the app server behind it thinks requests arrive on HTTP, so it builds http:// canonicals.
Free SEO audit
Not sure which issues matter on your site?
I'll review your site and send you the fixes that matter most, in plain English.
How to fix it
Change the canonical to the HTTPS URL. Usually that means fixing the setting that builds every canonical, not editing pages one by one.
Add a site-wide 301 redirect from HTTP to HTTPS (see the HTTP to HTTPS article for the .htaccess rule).
Update the sitemap, hreflang and internal links to HTTPS.
WordPress: set both addresses in Settings > General to https. Behind Cloudflare or another proxy, make sure WordPress detects HTTPS. Otherwise SEO plugins keep building http:// canonicals. A search-replace tool can fix old http:// links stored in the database.
Shopify, Webflow and Wix: these platforms serve HTTPS canonicals by default. An HTTP canonical almost always comes from custom head code or an app, so remove it.
Custom builds: set the site URL config to https. If the app runs behind a proxy, read the X-Forwarded-Proto header (Express: app.set('trust proxy', 1)) so the app knows the original request was HTTPS.
How to confirm the fix
View source on a few HTTPS pages and confirm the canonical starts with https://. Then use URL Inspection in Search Console on a key page to see which canonical Google has chosen after it recrawls.
A worked example
A WordPress site sits behind Cloudflare with "Flexible" SSL. Visitors connect to Cloudflare over HTTPS, but Cloudflare connects to the origin server over plain HTTP. WordPress sees an HTTP request and builds every canonical, sitemap URL and internal link as http://. The page in the browser is secure, but its canonical points to the insecure copy.
The lasting fix is end-to-end HTTPS: install a certificate on the origin and switch Cloudflare to "Full (strict)". Then set both WordPress addresses to https. Canonicals then come out correct without plugins or hacks.
Why this one matters more than the reverse
| Issue | What the signals say | Risk |
|---|---|---|
| Canonical from HTTP to HTTPS | "Prefer the secure copy" (correct) | Low: it's a tidiness problem |
| Canonical from HTTPS to HTTP | "Prefer the insecure copy" (wrong) | Higher: it pulls Google toward the HTTP version |
Common mistakes
Overriding the canonical in a plugin instead of fixing the base URL. The sitemap, Open Graph tags and internal links stay wrong.
Adding a redirect from https to http to "match" the canonical. Google treats HTTPS-to-HTTP redirects as a signal toward HTTP. Always go the other way.
Skipping the database cleanup. Old
http://image and link URLs inside post content also cause mixed-content warnings.
This guide isn't affiliated with or endorsed by Ahrefs.
Related issues
Sources and references
Google Search Central, How to specify a canonical URL (updated July 10, 2026)
Ahrefs Blog, Canonical Tags Explained (updated Oct 31, 2024)

About the author
Nazmul Nikhil
Head of SEO & Assistant Manager, Digital Marketing at Notionhive
SEO and AI search consultant in Dhaka, Bangladesh, helping small and mid-size businesses in the USA, UK, Australia and Canada.



