XML Sitemap: Everything You Need to Know
Think of an XML sitemap as a note you hand to Google before it even starts exploring your site: “Here’s every page I care about, and here’s when I last touched it.” <cite index=”14-1″>A sitemap is a file where you provide information about the pages, videos, and other files on your site, and the relationships…
Think of an XML sitemap as a note you hand to Google before it even starts exploring your site: “Here’s every page I care about, and here’s when I last touched it.” <cite index=”14-1″>A sitemap is a file where you provide information about the pages, videos, and other files on your site, and the relationships between them, and search engines read this file to crawl a site more efficiently.</cite>
Do You Actually Need One?
Not every site does. <cite index=”14-4,14-5″>If a site’s pages are properly linked through the menu or internal links, Google can usually discover most of it on its own — a sitemap just makes crawling easier for larger or more complex sites.</cite> You’re more likely to need one if:
- <cite index=”14-6″>Your site is large, since it becomes harder to guarantee every page is linked from at least one other page, making it more likely Googlebot misses new pages.</cite>
- <cite index=”14-7″>Your site is new with few external links, because crawlers discover pages by following links from already-crawled pages.</cite>
- <cite index=”14-8″>Your site has a lot of rich media (video, images) or appears in Google News.</cite>
Small sites (roughly under 500 pages) that are fully reachable by clicking through from the homepage often don’t need one at all — just requesting indexing of the homepage is enough.
What a Basic Sitemap Looks Like
At its simplest, an XML sitemap is just a list of URLs wrapped in <urlset> tags. <cite index=”10-1″>A single URL entry looks like this: a <url> block containing a <loc> with the page address and a <lastmod> date.</cite> <cite index=”10-2″>Google ignores the <priority> and <changefreq> tags some sitemaps include, and only trusts <lastmod> when it’s consistently and verifiably accurate — meaning it should match a real, meaningful update to the page.</cite>
Only include canonical URLs — the version of a page you actually want ranked, not duplicates.
Size Limits and Sitemap Index Files
<cite index=”3-2″>Every sitemap format caps out at 50MB uncompressed or 50,000 URLs — anything bigger has to be split into multiple sitemaps.</cite> When that happens, <cite index=”1-1,1-2″>a sitemap index file lets you submit many sitemaps at once, using the same XML format and rules as a regular sitemap.</cite> One structural rule to remember: <cite index=”1-4″>sitemaps referenced inside an index file must live in the same directory as the index file, or deeper in the site hierarchy.</cite>
Where to Put It and How to Submit It
<cite index=”3-5″>Sitemaps must be UTF-8 encoded, and while you can host one anywhere on your site, its location determines which URLs it can affect — a sitemap at the site root can cover the entire site, which is the more common setup.</cite> <cite index=”7-2″>Submitting a sitemap simply tells Google where to find the file; you can’t upload it directly to Google.</cite> You can do this through Google Search Console, or by referencing the sitemap URL in your robots.txt file.
Worth remembering: <cite index=”10-4″>submitting a sitemap is a hint, not a guarantee — Google may not download or use it for crawling every URL on the site.</cite>
Special Sitemap Types
Beyond the standard version, Google supports image, video, and news sitemap extensions for sites with rich media, plus sitemap index files for scale. If you’re running WordPress, plugins like Yoast or Rank Math generate and update your sitemap automatically — worth checking before building one by hand.
The Bottom Line
An XML sitemap won’t boost rankings on its own, but it removes friction between your content and Google’s crawlers — especially valuable for new or large sites. Keep it clean, canonical, and current, and let it do its quiet job in the background.
