Search Engine Basics

What Is an XML Sitemap? How to Create and Submit One

An XML sitemap is a file that lists the important pages on your website, so search engines can find them faster. This guide shows what a sitemap looks like. It explains when you need one, then walks you through creating it and submitting it to Google or Bing.

Updated 26 Oct 20269 min readChecked against sitemaps.org
Quick answer

An XML sitemap is a list of page addresses written in a format search engines can read. It usually lives at a URL like example.com/sitemap.xml. It helps crawlers discover new or updated pages, although it does not guarantee that every listed page gets indexed.

Usman AliWritten by Usman AliGrowth and SEO specialist · 7 years in SEO

The basics

What Is an XML Sitemap, in Plain Words

Picture a sitemap as the table of contents for your website. It gives crawlers a full list of pages, so they do not have to find every page by following links.

Search engines mostly find pages by following links, as our guide to crawling explains. That works well for pages with plenty of links pointing to them. It works badly for a brand new page, or a page buried five clicks deep.

A sitemap fixes that gap. It is a plain file, written in a format called XML, that lists each page address. It can also say when each page last changed. Crawlers such as Googlebot read the file, then add any new addresses to their crawl queue.

XML sitemap

Written for search engines

A machine-readable file of URLs. Visitors never see it, while crawlers use it to discover pages quickly.

HTML sitemap

Written for people

A normal web page full of links that helps visitors find their way. It can help crawlers a little, but it is not the same tool.

Look inside

XML Sitemap Example, Line by Line

Here is a small sitemap with two pages. The format looks technical, yet only one tag is truly required for each page.

<?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url> <loc>https://example.com/</loc> <lastmod>2026-10-20</lastmod> </url> <url> <loc>https://example.com/blog/first-post/</loc> <lastmod>2026-10-24</lastmod> </url> </urlset>
TagWhat it holdsDoes Google use it?
locThe full address of the page, including httpsYes, it is required
lastmodThe date the page content last changedYes, if the dates are honest
changefreqHow often the page might changeNo, Google ignores it
priorityHow important the page is, from 0.0 to 1.0No, Google ignores it

Google has said clearly that it skips the changefreq or priority values. So you can leave them out. Focus on accurate lastmod dates instead, because Google trusts them only when they match real changes.

Is it worth it?

Do You Need an XML Sitemap?

Most sites benefit from one, since it costs nothing to add. A few kinds of sites need it more than others.

Large sites

Shops or news sites with thousands of pages. Crawlers may miss deep pages without a full list to follow.

Strongly recommended

New sites

A fresh site has few links from other websites. A sitemap gives crawlers a way in before those links exist.

Strongly recommended

Small, well-linked sites

A ten-page site with a clear menu gets crawled fine without one. Adding a sitemap still does no harm.

Nice to have

Sites with lots of images, videos or news stories also gain from special sitemap types. Those types are covered in the next section.

Know the formats

Types of Sitemaps and Their Limits

The standard page sitemap covers most needs. These extra types help with bigger or richer sites.

TypeWhat it listsBest for
Page sitemapNormal web page addressesEvery website
Sitemap indexA list of other sitemap filesSites with more than 50,000 URLs
Image sitemapImages found on each pagePhoto sites, shops or portfolios
Video sitemapVideo details such as title and lengthSites that host their own videos
News sitemapArticles from the last two daysPublishers in Google News

Each sitemap file can hold up to 50,000 URLs. It must also stay under 50 MB before compression. Bigger sites split their pages across several files, then list those files in one sitemap index. Many SEO plugins do this for you, which is why WordPress sites often show a file called sitemap_index.xml.

Build it

How to Create an XML Sitemap

You rarely need to write a sitemap by hand. Pick the route that matches how your site is built.

01WordPress coreSince version 5.5, WordPress makes a basic sitemap at /wp-sitemap.xml with no setup.
02SEO pluginPlugins like Rank Math or Yoast build a cleaner sitemap index, then update it on every post.
03Other platformsShopify, Wix or Squarespace create a sitemap for you at /sitemap.xml.
04By handFor a tiny static site, write the XML yourself, then upload it to the root folder.

Whichever route you choose, open the sitemap in your browser once it is live. You should see a clean list of your real pages. If you spot test pages, old redirects or tag archives you do not want in search, change your plugin settings to leave them out.

Step by step

How to Submit a Sitemap to Google and Bing

Search engines can find your sitemap on their own. Submitting it still helps, because you get reports on what was read.

  1. Copy the full address of your sitemap, such as https://example.com/sitemap_index.xml.
  2. In Google Search Console, open Sitemaps from the left menu.
  3. Paste the address into the box, then press Submit.
  4. Wait a day or two, then check that the status says Success.
  5. In Bing Webmaster Tools, open Sitemaps, then submit the same address.
  6. Add a Sitemap line to your robots.txt file, so every crawler can find it.

The Sitemap line is covered in our robots.txt guide. Bing also supports IndexNow, a fast way to tell it about new or changed pages the moment you publish.

The Sitemaps report shows how many URLs Google discovered. To see which of them actually made it into the index, use the page indexing report described in our guide to checking if a page is indexed.

Real-world case

Why Google Retired the Sitemap Ping

Case study

When a handy shortcut became mostly spam

For years, site owners could ping Google whenever a sitemap changed. You simply opened a special web address with your sitemap URL attached. Many plugins did this automatically after every update.

  • 2005Google launches the Sitemaps protocol to help crawlers find pages.
  • 2006Yahoo and Microsoft join Google at sitemaps.org, so one format works everywhere.
  • June 2023Google announces it will retire the sitemap ping. Its research found most unauthenticated pings were not useful.
  • Late 2023The ping address stops working. Google relies on Search Console, robots.txt sitemap lines and accurate lastmod dates instead.

The same announcement stressed one more point. Google only trusts lastmod dates when they match real content changes. Some sites updated every date daily to look fresh, so Google learned to ignore them.

Lesson: submit your sitemap once in Search Console, keep lastmod honest, then let crawlers do the rest.

Avoid these

Common Sitemap Mistakes to Fix Today

A sitemap should be a clean list of pages you want in search. These errors send mixed signals.

MistakeWhy it hurtsThe fix
Listing noindex pagesYou ask Google to crawl a page, then tell it not to index itRemove noindex pages from the sitemap
Listing redirects or 404sCrawlers waste visits on addresses that lead nowhereList only final URLs that return 200
Non-canonical URLsDuplicate versions confuse which page should rankList the canonical version only
Fake lastmod datesGoogle stops trusting your dates entirelyChange lastmod only when content changes
Blocked in robots.txtGoogle cannot crawl the pages you just listedKeep listed pages open to crawlers

A quick monthly look at the Sitemaps report catches most of these. Any error there links straight to the problem URLs.

FAQ

Questions About XML Sitemaps

Where do I find my sitemap?

Try example.com/sitemap.xml or example.com/sitemap_index.xml first. On WordPress without an SEO plugin, the core sitemap sits at example.com/wp-sitemap.xml. Your robots.txt file may also list it on a Sitemap line.

Does a sitemap help my rankings?

Not directly. A sitemap helps search engines find pages, which is the first step toward ranking. The ranking itself depends on content quality, links and many other factors.

How many URLs can one sitemap hold?

One sitemap can hold up to 50,000 URLs, with a size limit of 50 MB before compression. Bigger sites split their URLs across several sitemaps, then list them in a sitemap index file.

Should every page be in my sitemap?

No. Only include pages you want in search results. Leave out redirects, error pages, noindex pages, thin tag pages or duplicate URLs.

How often should I update my sitemap?

Your sitemap should update every time you publish, change or delete a page. Most CMS tools and SEO plugins do this automatically, so you rarely need to touch it.

Wrapping up

Final Thoughts on XML Sitemaps

An XML sitemap is one of the easiest wins in SEO. It takes a few minutes to set up. Once it is in place, it quietly helps search engines find every page you publish. For most sites, a good plugin or the platform itself does all the work.

Your job is to keep the list clean. Include only real pages you want people to find. Leave out redirects, error pages or anything marked noindex. Keep the lastmod dates honest, so search engines keep trusting them. Submit the sitemap once in Google Search Console and Bing Webmaster Tools, then add it to robots.txt. After that, a short check each month is all it needs. A clean sitemap will not lift your rankings on its own, yet it makes sure your best pages never go unnoticed.

Scroll to Top