21+ years in hosting · Jaipur, India · INR billing with 18% GST · 24/7 email support
Blog · WebJi® India

What Is a Canonical URL?

Quick answer

A canonical URL is the one address you ask search engines to index when the same content opens at several URLs, such as www and non-www, http and https, or tracking parameters. You declare it with a rel=canonical link in the page head. Use a 301 redirect instead when only one URL should exist.

For site owners and developers fixing duplicate URLs, parameter pages or Search Console canonical warnings on WordPress and custom sites.

✓ In business since 2005
✓ INR + GST billing
✓ 24/7 Email Support — avg reply < 60 min
GuideWebJi®
knowledge
Read time
2 min
Sections
5
Updated
14 Nov 2026
Written by
WebJi® team

What is a canonical URL?

A canonical URL is the one address you ask search engines to treat as the main version of a page when the same or very similar content opens at several URLs. Google then indexes and shows that version and consolidates signals such as links onto it, instead of splitting them across duplicates.

Duplicates are usually accidental. One article may open at all of these addresses, and to a crawler each is a separate URL:

  • http://example.in/blog/post/ and https://example.in/blog/post/
  • https://www.example.in/blog/post/ and the same path without www
  • https://example.in/blog/post/?utm_source=whatsapp after a shared link
  • https://example.in/shop/?sort=price and other filter or sort parameters

How do you set a canonical URL with rel=canonical?

Add one <link rel="canonical"> element inside the page's <head>, pointing to the full absolute URL you want indexed. Put it on the duplicates and on the main page itself (a self-referencing canonical), so the preference is stated everywhere.

<head>
  <link rel="canonical" href="https://example.in/blog/post/">
</head>

For files that have no HTML head, such as a PDF, send the same hint as an HTTP response header:

Link: <https://example.in/guides/price-list.pdf>; rel="canonical"
  • Absolute URL: include https:// and the host; relative paths are supported but easy to get wrong.
  • One per page: two different canonical tags cancel each other out.
  • In the head only: a canonical link placed in the body is ignored.
  • Point at a live page: the target should return 200, not a redirect, 404 or noindex.

Canonical tag, 301 redirect or sitemap: which should you use?

Use a 301 redirect when only one URL should exist, a canonical tag when duplicates must stay reachable for visitors, and the sitemap as a weaker supporting signal. Google's guidance treats redirects and rel=canonical as strong signals and sitemap inclusion as a weak one, and it works best when all three agree.

Ways to tell Google which URL is canonical
MethodWhat the visitor seesSignal strengthUse when
301 redirectSent to the main URLStronghttp→https, www→non-www, an old page moved
rel=canonicalStays on the URL openedStrong (a hint, not a command)Sort and filter parameters, tracking tags, print versions
Sitemap listingNo changeWeakListing only canonical URLs to back up the other signals

Redirect rules for Apache are in the .htaccess 301 redirect guide, and choosing between the www and bare host is covered in www vs non-www. Do not use robots.txt or noindex to pick a canonical: a blocked page cannot pass its signals to the main copy.

Why does Google sometimes ignore your canonical?

Because rel=canonical is a hint, Google can select a different canonical when your other signals disagree with the tag. The usual causes are internal links, redirects or the sitemap pointing to another version, or two pages that are not actually duplicates.

Search Console's URL Inspection tool shows both the "User-declared canonical" and the "Google-selected canonical". In the Page indexing report, watch for these statuses:

  • Alternate page with proper canonical tag — working as intended; the duplicate points to an indexed main page.
  • Duplicate without user-selected canonical — add a canonical tag.
  • Duplicate, Google chose different canonical than user — align internal links, redirects and the sitemap with your tag.

Reading these reports is covered in the Google Search Console guide.

How should canonical tags handle pagination, languages and syndication?

Paginated pages and language versions should each canonicalise to themselves, while a syndicated copy on another site can point its canonical back to your original.

  • Pagination: page 2 of a category is not a duplicate of page 1; give ?page=2 its own self-referencing canonical.
  • Hindi and English versions: each language page canonicalises to itself and links to the other with hreflang.
  • Cross-domain: if a partner republishes your article, ask them to place a canonical pointing to your URL.
  • Near duplicates: city pages with different content are not duplicates; do not canonicalise them to one page.

How do you check and set canonical URLs in WordPress?

WordPress core already prints a self-referencing canonical tag on single posts and pages, and SEO plugins such as Yoast SEO or Rank Math extend it to archives and let you override it per post.

  1. Open the page, view source (Ctrl+U) and search for rel="canonical".
  2. From a terminal, the same check is curl -s https://example.in/blog/post/ | grep -i 'rel="canonical"'.
  3. To change it, edit the post, open the SEO plugin panel's Advanced section and enter the canonical URL.
  4. Re-inspect the URL in Search Console after the next crawl.

If canonicals, redirects and sitemaps conflict across a whole site, WebJi®'s WordPress SEO service can audit and align them.

FAQ

Frequently asked questions

Does every page need a canonical tag?

It is not required, but a self-referencing canonical on every indexable page is good practice. It protects against tracking parameters and accidental duplicates you have not noticed yet, at no cost.

Can a canonical point to a page on another domain?

Yes. Cross-domain canonicals are supported and are the usual way to credit the original when content is syndicated. Google treats it as a hint, so the two pages should be genuinely the same.

Is a canonical tag a ranking factor?

Not directly. It decides which URL is indexed and where signals such as links are consolidated. Getting it wrong can leave the version you care about out of search results.

What is a non-canonical URL?

Any other address for the same content that is not the one you named, such as the http twin, the www twin or a URL with a tracking parameter. It can still open for visitors but should not be the one indexed.

Checked against Google Search Central documentation, 14 November 2026 · Reviewed by the WebJi® team, Jaipur.

WebJi® since 2005

Ready to get started with WebJi®?

Join 12,000+ businesses across India and overseas. INR pricing, 18% GST shown before payment and 24/7 email support in Hindi and English — average first reply under 60 minutes.