Websites & Design

What is a sitemap and what is robots.txt? A plain guide for site owners

What a sitemap is, XML vs HTML sitemaps, what robots.txt does and does not do, how to find and submit yours to Google, and the common mistakes to avoid.

The short answer

An XML sitemap is a file that lists the pages on your site so search engines can find them; robots.txt is a file that tells crawlers which parts of the site they may visit. Most platforms create both automatically. For a small site that is well linked, Google says a sitemap is optional, but submitting one in Search Console costs nothing and shows you what Google found.

XML sitemap vs HTML sitemap

Two different things share the name.

An XML sitemap is for machines. It is a structured file, usually at yourdomain.com/sitemap.xml, that lists each page URL and, optionally, when it last changed. Google describes it as a way to tell search engines which content you consider important and to help them crawl more efficiently; it can also describe images, videos and news articles. Visitors never see it.

An HTML sitemap is an ordinary page for people, usually linked in the footer, listing every section and page. It was common when site menus were poor. It still helps on large sites and does no harm on small ones, but it is not what Google means by "sitemap" and it is not what you submit.

The rest of this article is about the XML kind.

Does a small business site need a sitemap?

Google's guidance is direct. You may not need one if your site is small (roughly 500 pages or fewer that you want in search), if every page is reachable through links from other pages, and if you have few images or videos you need found. Large sites, brand-new sites with few links pointing at them, and media-heavy sites benefit most. Google also notes that platforms such as WordPress and Wix typically generate a sitemap for you.

So a ten-page local business site does not strictly need one. It is still worth submitting, for one reason: the Search Console Sitemaps report tells you how many URLs Google discovered and flags errors. It is the cheapest health check you can run on a site, and it matters most when you launch a new site or change URLs, as our guide to replacing a website notes.

See what SEO & Performance Optimization would cost for your business

Answer a few questions about your project and budget and get a personalised plan, compared with typical market prices.

Book a free 15-min callAbout 3 minutes · no obligation · fixed price confirmed in writing

What robots.txt does, and what it does not

robots.txt is a plain text file at the root of your domain, always at yourdomain.com/robots.txt and never in a subfolder. It tells crawlers which URLs they may request, mainly to keep automated visitors from overloading a site or wasting time on pages that do not matter (search result pages, cart pages, admin areas).

Google is explicit about its limits. It is not a way to keep a page out of Google: a blocked page can still appear in results, without a description, if other sites link to it. To keep a page out of search, use a noindex tag or password protection. It is not security: well-behaved crawlers obey it, others do not. And if you use a hosted builder, you may not be able to edit it directly; the platform's search settings do the job instead.

A typical small business file is three lines: allow everyone, block the admin folder, and point to the sitemap:

User-agent: *
Disallow: /wp-admin/
Sitemap: https://www.example.ca/sitemap.xml

The most expensive robots.txt mistake is a leftover Disallow: / from a development site, which blocks the whole site. Check it on launch day.

How to find yours

  1. Type yourdomain.com/robots.txt into a browser. If a text file appears, that is it. If it lists a Sitemap line, that URL is your sitemap.
  2. Try yourdomain.com/sitemap.xml. WordPress uses /wp-sitemap.xml by default, and SEO plugins often use /sitemap_index.xml. Shopify, Wix and Squarespace all serve /sitemap.xml.
  3. Open a private browser window and repeat. Google's instructions for testing a robots.txt file start with the same step, to be sure the file is publicly reachable rather than only visible when you are logged in.

How to submit a sitemap to Google

Google accepts sitemaps in two ways. The first is a Sitemap line in robots.txt, which crawlers read on their own. The second is the Sitemaps report in Search Console, which also gives you feedback.

  1. Verify your site in Search Console as an owner. Without owner permission you cannot submit, though the robots.txt route still works.
  2. Confirm Google can fetch the sitemap URL with the URL Inspection tool.
  3. In the Sitemaps report, paste the URL into "Add a new sitemap" and submit.
  4. Check the status. "Success" means Google read it and queued the URLs; "Has errors" means some entries failed but the rest were read; "Couldn't fetch" means Google could not retrieve the file at all.

Submission is a hint, not a command. Google says a sitemap does not guarantee that every URL will be crawled or indexed, and that it ignores the priority and changefreq fields entirely. It uses lastmod only when the dates are consistently accurate, meaning they reflect real changes to the page, not an automatic stamp every time the file is generated.

Common mistakes Google warns about

  • Relative URLs. Every entry must be a full address starting with https://.
  • Mismatched versions. A sitemap at www.example.ca listing example.ca URLs, or http addresses on an https site, fails parsing.
  • Listing pages you do not want indexed. Redirected pages, duplicates, thank-you pages, tag archives. The sitemap should list only the canonical pages you want in search.
  • Blocking the sitemap in robots.txt. It happens; Search Console reports it as a fetch error.
  • Size. A single sitemap may hold at most 50,000 URLs and 50 MB uncompressed; larger sites split into several files joined by a sitemap index. No small business site will hit this.
  • Fake lastmod dates. If every page claims to have changed today, Google learns to ignore the field.

Sitemaps and robots.txt are a small part of the technical SEO basics; they will not rank a site on their own. They mostly prevent self-inflicted invisibility, which is enough reason to spend twenty minutes on them. If you would rather have a professional check the technical layer, our SEO service starts with exactly this.

Key takeaways

  • An XML sitemap lists your pages for search engines; an HTML sitemap is a page for visitors; robots.txt controls which URLs crawlers may request.
  • Google says small, well-linked sites may not need a sitemap, but submitting one in Search Console gives you free error reporting.
  • robots.txt does not keep pages out of Google or secure anything; use noindex or a password for that.
  • Use full https URLs, list only canonical pages, keep lastmod honest, and check for a stray Disallow: / on launch day.

Frequently asked questions

Where is my sitemap located?

Usually at yourdomain.com/sitemap.xml. WordPress without an SEO plugin uses /wp-sitemap.xml, and popular SEO plugins use /sitemap_index.xml. The surest route is to open yourdomain.com/robots.txt and look for a line beginning "Sitemap:", which gives the exact address.

Do I need a sitemap for a small website?

Google says you may not, if the site has fewer than roughly 500 pages, every page is linked from another page, and you have little media to surface. Submit one anyway: it is free, most platforms generate it automatically, and the Search Console report is the easiest way to spot pages Google cannot reach.

What is the difference between a sitemap and robots.txt?

A sitemap says "here are the pages I want you to know about". robots.txt says "here are the parts of the site you may or may not request". They work together: robots.txt usually contains a line pointing to the sitemap, and a mistake in robots.txt can block the pages the sitemap lists.

How often should I update my sitemap?

If your platform generates it, it updates itself whenever you publish or change a page. If it is a static file, regenerate it when you add or remove pages, and make sure the lastmod dates reflect real changes. Resubmitting in Search Console is not needed; Google re-reads the file on its own schedule.

Sources

  1. Learn about sitemaps — Google Search Central, updated December 10, 2025
  2. Build and submit a sitemap — Google Search Central, updated July 8, 2026
  3. Introduction to robots.txt — Google Search Central, updated December 10, 2025
  4. How to write and submit a robots.txt file — Google Search Central, updated November 21, 2025
  5. Sitemaps report — Google Search Console Help, accessed November 2026
  6. Sitemaps XML format — sitemaps.org, accessed November 2026

How Flowmatix can help

We put this into practice for businesses in Toronto and around the world through our SEO & Performance Optimization services. Want to know what it would take for your business? Get a personalised quote in about 3 minutes, or request a free website check-up.

Let's talk

Got a project in mind?

Book a free 15-minute strategy call. We talk through what you need, then you get a fixed price in writing before any work starts. No sales script.