Skip to main content
Take the diagnostic

Publish · Visibility

robots.txt, sitemap and canonical

Three tools for different problems, often misused through confusion.

Direct answer

robots.txt states who may request what. The sitemap suggests worthwhile destinations. canonical identifies the preferred equivalent version.

None replaces another or serves as access control.

What each does and does NOT do

What each does and does NOT do
ToolRoleLimitations
robots.txtAsks compliant crawlers not to request specified routes.Protects nothing. Does not prevent indexing externally linked URLs or compel compliance.
SitemapLists relevant URLs and dates.Does not compel crawling or indexing, or improve rankings by existing.
canonicalIndicates the preferred equivalent version.A signal, not an order. Does not fix substantive duplication.

The expensive mistake: robots.txt as security

robots.txt is a public file. Listing private routes publishes an index of material meant to stay hidden.

Protect private content with authentication or network controls. The robots.txt line can only reduce crawl noise on already protected routes.

Another mistake: blocking content meant for deindexing

Blocking a URL in robots.txtmeans the crawler cannot read itor see its noindex instruction. The URL may remain in results without a description because removal instructions are unreadable.

To remove a page from the index, allow crawling and place noindex inside. Counterintuitive but important.

The sitemap is not a wish list

Include only self-canonical, intended-to-be-indexed URLs returning 200.

Redirects, errors, pages with noindex and noncanonical versions add confusion. A sitemap-only page without internal links is also an orphan.

Frequently asked questions

robots.txt blocking or noindex?

noindex for index removal, with crawling allowed. robots.txt for reducing unhelpful crawling, without guaranteeing protection or deindexing.

Does a sitemap improve rankings?

Not by existing. It helps discovery, especially on large or poorly linked websites. Small well-linked websites can be discovered without it.

Does canonical fix duplicate content?

It clarifies equivalent versions of one page, not separate pages repeating an answer. Merge or differentiate those.

Primary sources

Each material claim on this page is supported by one of these sources, consulted on the stated date. Bot lists, capabilities and drafts change and are checked again at each review.

Primary sources consulted, with responsible organisation and date
OrganisationDocumentConsulted
Google Search CentralCommon Google crawlers2026-08-30
Google Search CentralOptimisation guide for generative AI features (updated 2026-07-10)2026-08-30

Next decision

Continue with a specific question

Conceptual illustrations; these are not client photographs.