Skip to content
Nazmul Nikhil
Menu

Canonical From HTTP to HTTPS in Ahrefs: Why a Redirect Beats the Tag

Ahrefs flags HTTP pages that canonicalize to HTTPS. The tag points the right way, but the HTTP page shouldn't load at all. Here's the 301 fix for any host.

Nazmul Nikhil

By

Head of SEO & Assistant Manager, Digital Marketing at Notionhive

Published 3 min read
Canonical From HTTP to HTTPS in Ahrefs: Why a Redirect Beats the Tag
Photo: Ali Kazal on Unsplash

In short

Ahrefs flags "Canonical from HTTP to HTTPS" when an HTTP page returns 200 and uses a canonical tag to point to its HTTPS version. Ahrefs calls this contradictory and likely low-impact. The fix is a site-wide 301 redirect from HTTP to HTTPS, plus internal links updated to HTTPS.

The canonical in this case points the right way. The problem is that the HTTP page loads at all instead of redirecting.

Why a redirect is better than the tag

Google calls both permanent redirects and rel="canonical" strong signals, and it generally prefers HTTPS. The difference is for people. A visitor who lands on the HTTP page sees the unencrypted version and may get a "Not secure" warning in the browser. A redirect sends both people and crawlers to the secure page.

How to fix it

  1. Make sure the SSL certificate is valid on every hostname you use, with and without www.

  2. Add a site-wide 301 redirect from HTTP to HTTPS.

  3. Update internal links, the XML sitemap and canonicals to use HTTPS.

  4. Recrawl. These pages should now appear under "HTTP to HTTPS redirect", which is a normal, low-priority notice.

cPanel or Apache (.htaccess):

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

Many cPanel hosts also have a "Force HTTPS Redirect" toggle under Domains, which does the same job.

WordPress: set both addresses in Settings > General to https first, then add the redirect at server level as above. A plugin can do this too, but a server rule is faster.

Shopify, Webflow and Wix: these platforms issue SSL certificates and force HTTPS for connected custom domains. If HTTP pages still load, check the domain connection and DNS records with each platform's domain guide.

Nginx: add a server block for port 80 that returns 301 https://$host$request_uri;.

Custom builds (Node/Express behind a proxy): if the app sits behind a load balancer, redirect based on the X-Forwarded-Proto header, not the raw connection. Otherwise you can create a redirect loop.

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.

Get my free audit →

How to confirm the fix

Request an http:// URL in a redirect checker. You should see a single 301 hop to the https:// version, and then a 200.

A worked example

A site moved to HTTPS years ago. The developer at the time added canonicals pointing to https, but never added a redirect. Today http://example.com/services/ and https://example.com/services/ both load. Some old directories and partner sites still link to the http version. Visitors arriving that way see "Not secure" in the address bar, and their visit is unencrypted.

After a site-wide 301, every http request lands on https. Old backlinks now pass through the redirect to the secure page, and the canonical tag simply confirms what the redirect already says.

What to check after adding the redirect

  1. One hop only. http://www.example.com/page/ should go straight to the final URL, not through http to https to non-www as separate hops.

  2. No mixed content. Images, scripts and styles should also load over https, or browsers may still warn visitors.

  3. Sitemap and canonicals on https, so search engines only see the secure version.

  4. Search Console property. Verify the https version (or a Domain property) so you see data for the right URLs.

Common mistakes

  • Using a 302 instead of a 301. A temporary redirect is a weaker signal that the move is permanent.

  • Redirecting in two hops (http to https, then www to non-www). Combine the rules into one.

  • Turning on HSTS before every subdomain supports HTTPS. Browsers will then refuse to load any subdomain that doesn't.

This guide isn't affiliated with or endorsed by Ahrefs.

Sources and references

TAGSAhrefs Site AuditCanonical from http to httpsAhrefs canonical http to httpsHttp to https redirect
Nazmul Nikhil

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.

Need help with this?

Get it fixed with Technical SEO

I find the issues that cost you traffic and fix them, starting with the pages that matter most.

Keep reading

Related articles

All Site Audit Issues posts →

Get the next guide in your inbox

One email when a new SEO or AI search guide goes live.

Ready to grow?

Get a free audit of your website, or book a 30-minute call to talk through your goals.

Nazmul Hasan

Talk to Nazmul directly

Reply within 24h

WhatsApp +880 1682835118
nazmulnikhil@gmail.com