Skip to content
Get 600 trial creditsGet 600 credits

Which page is the main one? When your website gives search engines two answers

A canonical tag tells search engines which address is a page’s main version. When it names a page that is hidden, missing or blocked, search engines choose for themselves. Pages left out of the index cannot be links in Google’s AI answers.

Share

Share on X (Twitter) (opens in a new tab)Share on LinkedIn (opens in a new tab)Share by email

Summarize with AI

Summarize in ChatGPT (opens in a new tab)Summarize in Claude (opens in a new tab)Summarize in Perplexity (opens in a new tab)

Get a short summary from ChatGPT, Claude or Perplexity.

Add as a preferred source

Add Aibuku as a preferred source on Google (opens in a new tab)

Pick Aibuku on Google to see more of our posts in Top Stories.

Most pages on the web carry a small note for search engines. It says: “the main version of this page is at this address.” The note is called a canonical tag, and about two in three pages have one.

When the note points to the right page, nobody notices it. When it points to a page that search engines cannot show, they stop taking it at its word and choose a main page for themselves. That may not be the page you wanted in search, or in AI answers built on search.

Here is what the note does, how it goes wrong, and how to check your own pages.

What a canonical tag is

The same page often lives at more than one address. An ad adds a tracking code to the end. Some links end with a slash and some do not. Some use capital letters.

To you, these are one page. To a search engine, each address could be a page of its own. The canonical tag tells it which address is the main one. Then the links to every copy count for that one address. Google calls this combining the signals “into a single, preferred URL”.

Three addresses for one page, and one main version

Each copy’s canonical tag names /repairs. Search engines can then count the links to all three for that one page.

Source: Google: a canonical tag helps search engines combine the signals of each address, such as links, into one preferred address.

The main page carries the tag too, naming itself. Google asks for that.

A hint, not a rule

A canonical tag is a request, not an order. Google says choosing a main page “is a hint, not a rule”, and that it may choose a different page than you do.

Search engines weigh several signals together. Google ranks them: a redirect is the strongest, the canonical tag is strong, and a page in your sitemap is a weak signal. They add up when they agree. Google also asks you not to give two answers, for example one page in your sitemap and another in the tag.

Signals add up when they agree

On the right, the tag says /repairs is the main page, but the sitemap lists /repairs-2024 as one. Google asks for one answer.

They agree/repairsThey disagree/repairs-2024
Hidden from searchNoNo
Canonical tag namesStrong signal/repairs/repairs
In the sitemapWeak signalYesYes
Other pages name it as main/repairs?ref=ad, /repairs-2024None
One answer?YesThe sitemap lists it, but its tag names another page
Source: Google: a canonical tag is a strong signal and a sitemap a weak one; they can stack. Do not give different answers in different places.

This matters because the page Google picks is the page it judges, and usually the page it shows. If your signals disagree, that may not be the page you wanted.

When the main page cannot be shown

A canonical conflict is when the tag names a main page that search engines cannot use. The named page can be:

  • Hidden. It is marked noindex, which asks search engines not to show it.
  • Gone. It answers “not found”, or it loads with no real content.
  • Blocked. Your robots.txt file tells search engines not to read it.
  • Moved. It redirects to yet another address.
  • Pointing on. Its own tag names yet another page.

Where a canonical tag can point, and what search engines find there

Only the first is a main page that can do its job. Three fail, and two work the long way round.

Source: Google’s 2013 list of canonical mistakes: a target should exist and carry no noindex. Google’s 2009 notes: redirects and chains are followed. John Mueller of Google (2018): with robots.txt blocking a page, Google “couldn’t even use it for canonicalization”.

The first three are mistakes. In 2013, Google’s list of canonical mistakes said to check that the named page exists and carries no noindex. For a page blocked by robots.txt, John Mueller, who works on Google Search, wrote in 2018 that Google “couldn’t even use it for canonicalization if we wanted to”. When the tag cannot do its job, Google chooses a main page for itself.

The last two work, but the long way round. In 2009, Google’s notes said you can name a page that redirects, and Google follows the redirect. They said it can follow chains of tags too, but “strongly” recommended that every copy name the main page directly.

A related mix: one page that says “hide me” and “the main version is over there” at once. Google advises against using noindex to choose a main page, because it removes the page from Search completely. In the same 2018 answer, Mueller called the two “very contradictory pieces of information for us”, and said Google would generally pick the canonical tag. Google’s staff have said other things at other times, and its documentation does not settle it. So do not send both.

A hidden page that names itself is not a conflict. It just stays out of search. That is fine if you meant to hide it.

Why it matters, also for AI answers

When signals clash, the search engine decides which page counts.

The cost is clearest for a page that is left out of the index. Google says a page must be “indexed and eligible to be shown in Google Search with a snippet” to be a link in its AI Overviews or AI Mode. Its newest page on AI answers says the same.

Only pages in Google’s index can be links in its AI answers

Google asks for a page that is indexed and may show a snippet. Bing says noindex keeps a page out of Copilot too.

Source: Google: a page must be “indexed and eligible to be shown in Google Search with a snippet”. Bing: noindex keeps a page out of Bing search, Copilot and grounding results.

Bing says noindex keeps a page out of Bing search, its Copilot and the results it gives AI tools to build answers on. It adds that duplicate addresses lower its confidence in which one to use for citations. In its own words, “many LLMs rely on data grounded in the Bing index or other search indexes”.

Copies also cost search engines time, because they keep reading them. Google says this is mainly a concern for websites with a million or more pages that change every week, or 10,000 or more that change every day. For most businesses, it is not the reason to fix this.

How to check your pages

  1. Open one of your pages in Chrome. Right-click and choose View page source.
  2. Search the source for canonical. Copy the address after href=.
  3. Open that address. It should load, stay at that address and show the real page.
  4. View that page’s source too. Search for noindex: you should find nothing. Its own canonical tag should name itself.

If you use Google Search Console, open the Page indexing report. “Duplicate, Google chose different canonical than user” means Google did not take your tag as given. “URL marked ‘noindex’” on a page you want found means that page is hidden. Google’s live test of a single address does not check canonical tags, so use the report.

One answer per page

The fix is not a new tag. It is a decision. For each page, decide what it is, then make every signal say the same.

Every page should give one answer

Decide what each page is, then make every signal say it. A hidden page that names itself is fine.

Show it/repairsIt is a copy/repairs?ref=adKeep it out/staff-rota
Hidden from searchNoNoYes
Canonical tag namesStrong signal/repairs/repairs/staff-rota
In the sitemapWeak signalYesNoNo
Other pages name it as main/repairs?ref=adNoneNone
One answer?YesYesYes
Source: Google: name the main page on the page itself, and do not use noindex to choose one. Bing: list only main pages in a sitemap.
  • Show it. No noindex. Its tag names itself. It is in your sitemap, and your own links point to it.
  • It is a copy. Its tag names the main page, and that page is one you show. It is not in your sitemap. If the copy does not need to exist, Bing suggests a redirect instead.
  • Keep it out. Mark it noindex and leave it out of your sitemap. No other page should name it as its main page.

For your developer: Next.js

This part is for the person who builds your website. Many sites built with Next.js set their page tags through its metadata. Its documentation says metadata from layouts and pages is “shallowly merged”. A value a page does not set comes from the nearest layout above it. So one line in a layout can reach every page below it.

Three ways this goes wrong:

// app/layout.tsx: every page that sets no canonical of its own now names the home page
export const metadata = {
  metadataBase: new URL('https://yourbusiness.com'),
  alternates: { canonical: '/' },
}
// app/compare/layout.tsx: every page under /compare is now hidden,
// while other pages may still name them as their main page
export const metadata = { robots: { index: false } }

The third is a sitemap built from every page in the content system, so it lists hidden pages and copies too.

The fix is to decide what each page is in one place, and let the tags and the sitemap read that same answer:

import type { Metadata, MetadataRoute } from 'next'

/** What a page is. One answer per page, decided in one place. */
export type ShownPage = { path: string; kind: 'show' }

/** A copy names its main page, and the type only lets that be a page that is shown. */
export type SitePage = ShownPage | { path: string; kind: 'copy'; main: ShownPage } | { path: string; kind: 'keep-out' }

/**
 * Each page's own canonical and robots rule. Set both on every page:
 * metadata merges shallowly, so a value a page leaves out is
 * inherited from the nearest layout that sets it.
 */
export function pageMetadata(page: SitePage): Metadata {
  return {
    alternates: { canonical: page.kind === 'copy' ? page.main.path : page.path },
    robots: { index: page.kind !== 'keep-out', follow: true },
  }
}

/** The sitemap lists the pages to show, and nothing else. */
export function sitemapFrom(pages: readonly SitePage[], origin: string): MetadataRoute.Sitemap {
  return pages
    .filter(page => page.kind === 'show')
    .map(page => ({ url: new URL(page.path, origin).href }))
}

Each page's generateMetadata returns pageMetadata(page), and app/sitemap.ts returns sitemapFrom(pages, origin). Set metadataBase once in the root layout, so a canonical such as /repairs becomes a full address. Then check what a search engine really gets:

curl -s https://yourbusiness.com/repairs | grep -oiE '<link[^>]*rel="canonical"[^>]*>|<meta[^>]*name="robots"[^>]*>'

Aibuku reads the canonical tag of each page it checks on your website. When a tag names a page that failed to load or asks to be hidden, it lists the page with that tag among your fixes. It also asks your customers’ questions in Claude, ChatGPT, Gemini and Grok on a schedule, and shows who gets named instead of you and why.

Keep reading

  1. How AI chooses

    Fewer people click. What that means for your marketing

    When Google shows an AI summary, people click fewer links. Most US Google searches now end without a click. More people ask AI too, and its answers name only a few businesses.

  2. Your website

    Three more website checks for AI, and two you can skip

    Your firewall can turn AI robots away even when robots.txt lets them in. A sitemap with true dates helps search engines find and refresh your pages. llms.txt and schema show no gain in AI answers yet.

  3. Your website

    Can AI assistants read your website?

    Not always. Some websites block the robots AI assistants send, often without knowing it. Others show their words only after a script runs, and many robots never see them.

Your business could be the name AI says.

A customer asks AI: Who does the best bike repair in Amsterdam Oost?

An AI answer: The best bike repair in Amsterdam Oost is your business here.

Use them within 7 days. Card required. Your paid plan starts after that unless you cancel.