✧ Key takeaways

What a sitemap is, how to create one for WordPress or any site, and how to submit it in Google Search Console — step by step, with the errors to watch for.

Google cannot rank a page it never finds. Most of your pages get discovered the normal way — Google follows links from your homepage, your menus, and other sites. But some pages sit too deep, too new, or too disconnected for that to work reliably. A sitemap is the file you hand Google that says: here are the pages I want you to know about, and here is when each one last changed.

It takes about ten minutes to set up, it costs nothing, and it is one of the few SEO tasks where the instructions come straight from Google itself. This guide covers what a sitemap is, how to create one for your site, and how to submit it in Google Search Console — plus the mistakes that make the whole exercise pointless.

What a sitemap actually is

A sitemap is a file, usually XML, that lists the URLs on your site you want search engines to crawl. Each entry is a page, and each page can carry one useful piece of extra information: the date it was last modified. That is the whole format at its simplest:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://www.example.com/blog-post/</loc>
    <lastmod>2026-11-20</lastmod>
  </url>
</urlset>

Google also accepts two other formats. An RSS, mRSS, or Atom feed can act as a sitemap — handy because most content systems already generate a feed, though a feed only covers recent URLs. A plain text file with one URL per line works too, if all you need is a list of pages. XML is the most flexible of the three: it can carry extra data about images, video, news, and translated versions of pages.

One thing a sitemap is not: a page on your site that lists links for visitors. That is an HTML sitemap, and it is fine for navigation, but Google Search Console will not accept it as a submitted sitemap. The file you submit is meant for crawlers, not readers.

What goes in a sitemap — and what stays out

A sitemap is a list of the pages you want in search results. That sounds obvious, but most bad sitemaps fail right here, by listing everything the site can produce instead of everything worth indexing.

Include the canonical version of each page — the one URL you want Google to show. If the same content lives at two addresses, pick one and list only that one. Google says it generally shows canonical URLs in search results, and your sitemap is one of the signals it uses to decide which version that is.

Leave out anything you do not want indexed. That means no 404 pages, no URLs that redirect somewhere else, no pages blocked by robots.txt, and no pages carrying a noindex tag. Listing a page in your sitemap while also telling Google not to index it sends two opposite instructions, and Google resolves the contradiction by ignoring the sitemap entry. The same goes for thin utility pages — login screens, cart pages, internal search results, tag archives with one post. If a page has no reason to appear in search results, it has no place in the sitemap.

Use absolute URLs, with the full domain: https://www.example.com/page/, not /page/. Google crawls the URLs exactly as listed, and a relative URL in a sitemap is a broken instruction.

The size limits (and what to do when you hit them)

Google caps a single sitemap at 50,000 URLs or 50 MB uncompressed — whichever comes first. You can gzip the file to save bandwidth, but the 50 MB limit applies to the uncompressed size, so compression does not buy you more room.

Most small sites never come close. A blog with 300 posts, a shop with 2,000 products, a company site with 80 pages — all of these fit in one file with room to spare. The limit matters for large sites: big stores, news sites, directories, and anything with user-generated content.

When you do outgrow one file, you split it and use a sitemap index: a single file that points to your other sitemap files. A sitemap index can reference up to 50,000 sitemaps, and you submit the index file itself to Google instead of the individual files. WordPress SEO plugins do this automatically — Yoast and Rank Math both generate a sitemap_index.xml that splits your content by type (posts, pages, categories, products) without you touching anything.

How to create a sitemap for your site

How you generate the file depends on what your site runs on. In most cases you never write XML by hand.

WordPress

WordPress has generated a basic sitemap since version 5.5, at yoursite.com/wp-sitemap.xml. It works, but it is bare bones. If you run Yoast SEO or Rank Math, the plugin takes over and generates a far better one at yoursite.com/sitemap_index.xml, split by content type, with images included and updated automatically whenever you publish or edit. If you already use one of those plugins, your sitemap exists right now — check the URL in your browser before doing anything else.

Wix, Squarespace, Shopify, and other hosted builders

These platforms generate a sitemap automatically. Wix puts it at yoursite.com/sitemap.xml, Shopify at yoursite.com/sitemap.xml as well, Squarespace too. You generally cannot edit the contents directly, which is fine — the platform keeps it in sync with your pages. Your job is only to find the URL and submit it.

Custom or static sites

If your site is hand-built or generated by a static site generator, you have two options. For a few dozen pages, you can write the XML yourself in a text editor — the format is simple enough that a careful copy of the example above will work. For anything bigger, generate it: most static site generators have a sitemap plugin, and standalone sitemap generator tools can crawl your site and build the file from your database or your published URLs. Whatever you use, the file must be UTF-8 encoded and hosted at your site root if you want it to cover the whole site — a sitemap posted in a subdirectory only affects pages under that directory unless you submit it through Search Console.

How to submit your sitemap to Google (step by step)

Submitting takes about two minutes once the file exists. You need a verified property in Google Search Console first — if you have not set that up yet, our step-by-step Google Search Console setup guide walks through verification.

  1. Open Search Console and pick your property. Make sure you are looking at the right domain — the www and non-www versions are separate properties unless you verified at the domain level.
  2. Go to Sitemaps in the left menu. It sits under Indexing. You will see a list of sitemaps you have already submitted, with their status.
  3. Enter the sitemap URL. You only need the part after your domain: sitemap.xml or sitemap_index.xml. If your sitemap lives at a different address, paste the full URL.
  4. Click Submit. Search Console fetches the file and reads it. The status will show as Pending at first, then change once Google has processed it.
  5. Check back in a day or two. The Sitemaps report shows when Googlebot last read the file, how many URLs it discovered, and whether anything went wrong. That last part matters more than the submission itself.

There are two other ways to make a sitemap available to Google, and both work without opening Search Console at all. The first is the robots.txt method: add a line anywhere in your robots.txt file that reads Sitemap: https://example.com/sitemap.xml. Google finds it the next time it crawls robots.txt, and you can list as many sitemap lines as you like. The second is the Search Console API, which lets you submit sitemaps programmatically — useful if you run many sites or rebuild sitemaps on a schedule.

One thing to understand clearly: submitting a sitemap is a hint, not an order. Google says so in its own documentation. Submission does not guarantee Google will download the file, crawl the URLs, or index any of them. What it does is give Google a complete, current list to work from — and for new or deep pages, that list is often the difference between being found in days and being found in months.

How to tell whether Google actually read it

Submission is the easy part. The useful part is what the Sitemaps report tells you afterwards. Open the report a day or two after submitting and look at three things.

Status. Success means Google fetched the file and parsed it. "Couldn't fetch" means Google could not reach the URL at all — the file might be missing, the server might have errored, or the URL might be wrong. "Has errors" means the file was fetched but something inside it is broken, usually invalid XML or URLs that violate the format rules.

Discovered URLs. This is the count of URLs Google found in the file. Compare it with what you expect. If your site has 400 pages and the report says 12 discovered, something is wrong with the file — maybe it only lists one content type, or the index file points to sitemaps Google cannot reach.

Last read date. Google re-reads sitemaps on its own schedule. If the last read date is weeks old and you have published new pages since, resubmit — the resubmit button in the report forces a fresh fetch.

If a sitemap shows errors, click into it. Search Console lists the specific problem and the affected URLs, and most fixes are small: a malformed XML tag, a URL that redirects, a page that returns a 404, or a URL blocked by robots.txt.

Common sitemap errors and how to fix them

Couldn't fetch. Google could not download the file. Check the URL in your browser first — if you get a 404 or a server error, so does Google. Common causes: the sitemap plugin was deactivated, the file was deleted during a redesign, or the URL you submitted has a typo.

Sitemap has errors / invalid XML. One bad character can break the whole file — an unescaped ampersand in a URL is the classic one. If you hand-edit sitemaps, run the file through an XML validator before submitting. If a plugin generates it, update the plugin; a stale plugin generating bad XML is more common than people expect.

Submitted URL not found (404). The URL is in the sitemap but returns a 404 when Google fetches it. Remove dead URLs from the sitemap, or fix the page. A sitemap full of 404s teaches Google to trust it less.

Submitted URL blocked by robots.txt. Your robots.txt disallows a URL that your sitemap lists. Decide which instruction is right: if the page should be indexed, remove the robots.txt block; if it should stay blocked, remove it from the sitemap.

Submitted URL seems to be a duplicate. Google picked a different canonical URL than the one in your sitemap. Usually the fix is on the page itself — check the canonical tag and make sure it points at the URL you actually want indexed.

Sitemap is too large. Over 50,000 URLs or 50 MB. Split it into multiple sitemaps behind an index file, as described above.

Do you actually need a sitemap?

Not every site benefits equally, and Google is honest about that. If your site is small — a few hundred pages, all linked from your navigation and homepage — and every page is reachable within a couple of clicks, Google will find your content without a sitemap. Submitting one still costs nothing and still helps new pages get noticed faster, but it is not the thing holding your SEO back.

A sitemap earns its keep in four situations. Your site is large, with thousands of pages or deep archives that internal links never reach. Your site is new, with few or no external links pointing at it, so Google has no other way in. Your pages change often and you want fresh versions crawled quickly — news sites and stores with rotating inventory live here. Or you have rich media — video and image content that benefits from the extra metadata an XML sitemap can carry.

It also helps in one quieter case: orphan pages. Every site accumulates them — a landing page built for one campaign, a PDF-linked resource, a post that never got added to any category page. Internal links never point at them, so crawlers never find them. A sitemap is the only route in.

Mistakes that make a sitemap useless

Listing everything. A sitemap that includes login pages, cart pages, search-result pages, and every tag archive is a sitemap Google learns to ignore. List the pages you want in search results. Nothing else.

Stale lastmod dates. Google uses the <lastmod> value only when it is consistently accurate — it compares the date against the actual last modification of the page. A sitemap that claims every page changed today, every day, gets its dates ignored. Keep lastmod honest and let your CMS or plugin update it automatically.

Filling in priority and changefreq. Google ignores both values entirely. They are part of the sitemap protocol, but Google has said for years that it does not use them. Setting every page to priority 1.0 does nothing except waste your time.

Submitting once and never checking. Sites change. Plugins break. Redesigns move the sitemap to a new URL. The Sitemaps report is the only place that tells you the file stopped working, and it will not email you about it. Check it after any redesign, any migration, and any plugin change — and once a quarter as routine.

Expecting it to fix indexing problems. A sitemap helps Google discover pages. It does not make Google index them. If your pages are thin, duplicated, or low quality, they will stay out of the index with or without a sitemap. That is a content problem, and no XML file solves it. Our guide to what happens after you click publish covers the indexing side in detail.

The short version

A sitemap is a list of the pages you want Google to find, in a format Google can read in seconds. Most sites already have one generated automatically — check yoursite.com/sitemap.xml before building anything. Submit it in Search Console's Sitemaps report, add the Sitemap: line to robots.txt as a backup, and check the report after a day or two to confirm Google read it and found the URLs you expected. Keep the list clean, keep the dates honest, and re-check it whenever the site changes. Ten minutes of setup, a few minutes of checking each quarter, and your new pages stop waiting months to be found. Once your sitemap is submitted, the next step is making sure the pages it lists target topics people actually search for — our free keyword research guide shows how to find them.

Information checked November 28, 2026, against Google's official sitemap documentation (Google Search Central) and the Search Console Sitemaps report guidance. Sitemap limits, formats, and submission methods change rarely, but confirm current details on Google's documentation before relying on them.

Mors

Mors is a senior technology analyst and developer who builds, tests, and breaks modern software platforms to find what truly works. Specializing in cloud engineering, optimization tools, and SaaS architecture, they provide data-driven, objective reviews designed to save development teams time, money, and computing overhead.