How should you choose and canonicalize HTTP, HTTPS, and www URL versions?

ProcrustesPR

Do not assume Google ignores the difference between HTTP and HTTPS. These URL versions need to be consolidated. If the same content loads at different versions without redirecting to a single version, choose a primary HTTPS version and use 301 permanent redirects to send the other versions to the corresponding URLs on that version. Either www or non-www is fine. What matters is consistent configuration; neither form necessarily ranks better.

ProcrustesPRProcrustesPRHow should you balance CNAME convenience and performance?

Choose HTTPS, then use www or non-www consistently

Choosing a protocol and deciding whether to use www are two separate decisions. HTTPS encrypts data transmitted between the server and browser, giving it a security advantage. For www versus non-www, SEO does not require one form over the other. Both Semrush and yesharris explain that either form is acceptable, provided you choose a primary version and configure the site consistently.

For example, if you choose https://example.com/ as the primary version, redirect the HTTP and www versions that display the same content to it. Choosing https://www.example.com/ is also fine. An established website should not change its primary URL lightly just to remove or add www.

After choosing a primary URL, align the settings

Once you have chosen a primary version, adjust the website’s redirects and CMS settings to match. A 301 redirect sends users and search engines from different versions of the same page to a single primary URL, rather than leaving each version to display the same content separately.

  • Redirect HTTP URLs and whichever form you did not choose—www or non-www—to the selected HTTPS version.
  • Check that the protocol and www settings in the CMS site URL match the primary version. Mismatched versions may cause redirect loops.
  • If the homepage also has entry points such as index.php or index.html, check whether they need to be consolidated for the CMS your site uses. Do not assume every website has these entry points.

The goal is to consolidate URL versions that display the same content, not to merge pages with different content into one page.

Verify redirects and check what your reports cover

Once the website has an SSL or TLS certificate installed, test each combination of HTTP/HTTPS and www/non-www. First, check whether the browser’s address bar shows the expected version after the redirect. Then use a status code checker to confirm that the redirect returns a 301 response. Do not assume the configuration is complete simply because all versions load.

In Search Console, first check what each property covers. A Domain property can combine data across different protocols and URL versions, while a URL-prefix property covers only the specified version. Make sure the property you are viewing includes the target URL so you do not overlook data for another version.

Correct redirects do not guarantee that Google will choose your preferred canonical URL. An Ahrefs article from 2021 notes that Google uses multiple canonicalization signals. Even if a third-party tool consolidates different versions, that alone does not prove Google has made the same choice.

ProcrustesPRProcrustesPRShould you use a 302 redirect to a temporary alias for the new server during a DNS update?

HTTP, HTTPS, and www URL versions: perspectives from across the web

Is choosing a preferred URL when generating a sitemap enough to consolidate the versions?

No, this step alone is not enough. In one discussion, a webmaster found that their canonical URL version had already been configured at the server level; entering another version when generating the sitemap produced unexpected results. This was that website's experience and does not mean all websites work the same way. Before creating a sitemap, confirm which primary version the website actually uses so that the submitted URLs match the site's configuration.

Can a canonical tag guarantee that Google will choose the specified version?

No. A canonical tag can indicate which page you want search engines to use, but Google considers multiple canonicalization signals when making its decision. In 2021, Ahrefs explained that its tool consolidates links according to the redirects and canonicals specified by a website. This describes how the tool processes them; it does not imply that Google will make the same choice in every case.

If reports do not show other versions, does that mean the website has no other entry points?

Not necessarily. Search Console reports may not show URLs that Google has not yet crawled, and analytics reports may also omit pages that have received no traffic. Reports can therefore help identify versions, but the absence of records alone cannot rule out other entry points. You can also visit the different versions directly and check them with a crawler, then interpret the results in light of the website's architecture.

ProcrustesPRHow does HSTS protect websites and subdomains?

References

  1. www in Sitemap URL'swebmasters.stackexchange.com — Discusses: Is choosing a preferred URL when generating a sitemap enough to consolidate the versions?
  2. What Are Canonical Tags?neilpatel.com · 2022-09-10T07:00:00+00:00 — Discusses: Can a canonical tag guarantee that Google will choose the specified version?
  3. 認識SEO排名的殺手,『重複內容』超完整攻略www.yesharris.com · 2019-02-25T14:00:21+08:00 — Discusses: If reports do not show other versions, does that mean the website has no other entry points?
  4. How Ahrefs Counts Links and Domainsahrefs.com · 2021-01-12T16:00:44+00:00 — Discusses: Can a canonical tag guarantee that Google will choose the specified version?
  5. Redirects: What They Are & How to Use Themwww.semrush.com · 2020-07-20T11:00:00Z — Source used in the article above.
  6. Google Search Console 教學:使用與設定指南www.yesharris.com — Source used in the article above.
  7. 8 Steps to Perform a Technical SEO Audit for a Client’s Blogwww.semrush.com · 2021-11-22T10:50:00Z — Source used in the article above.
  8. The technical SEO checklist for search engines and AI searchwww.semrush.com · 2024-09-18T14:13:00Z — Source used in the article above.
  9. WordPress SEO 優化教學,一定要做的基本設定www.yesharris.com · 2024-06-17T19:34:08+08:00 — Source used in the article above.
  10. How to Perform a Complete SEO Audit in 20 Stepswww.semrush.com · 2020-06-01T11:00:00Z — Source used in the article above.
  11. What Is the ‘Too Many Redirects’ Error? & How to Fix Itwww.semrush.com · 2021-08-13T15:59:00Z — Source used in the article above.

Related articles

How should you balance CNAME convenience and performance?Should you use a 302 redirect to a temporary alias for the new server during a DNS update?How does HSTS protect websites and subdomains?How do SSL certificates protect websites, and why are they needed?Should a Tumblr blog use the platform’s domain or the company’s domain?What types of URLs are there, and what are they used for?When should you use relative or absolute paths in WordPress?What are www subdomains and relative links used for?
ProcrustesPR
ProcrustesPR