# What is the difference between robots.txt and an XML sitemap?

Canonical: https://www.namesilo.com/questions/websites-and-ai/what-is-the-difference-between-robots-txt-and-an-xml-sitemap

Published: 2026-11-17

Last updated: 2026-11-17

Topic: Websites & AI

A robots.txt file gives compliant crawlers instructions about which paths they may crawl, while an XML sitemap lists URLs you want them to discover. Neither is an access-control system. Blocking a URL from crawling does not reliably keep its address out of search results, and a sitemap does not guarantee indexing.

Do not use crawler rules to protect private data

Private areas need authentication or other appropriate access controls. For public pages that should not appear in search, use a supported indexing directive and allow the crawler to see it where required.

Your next steps

List crawlable public URLs

Use the correct indexing controls

Protect private content with access restrictions

From a name to a working website

Domain registration, site creation, and hosting are separate tasks, even when a provider bundles them. Keep control of your domain and check what can be exported before committing your content and business workflows to a builder.

Ownership: Registrar access and content rights.

Features: Forms, payments, email, and integrations.

Portability: Code, data, assets, and backend dependencies.

Launch: Mobile usability, HTTPS, redirects, and working forms.

## Sources

- [Google Search: site moves with URL changes](https://developers.google.com/search/docs/crawling-indexing/site-move-with-url-changes)
