How to Create an XML Sitemap (and Why It Matters for SEO)
Guide · SEO Tools
A sitemap is a plain XML file listing every page on your site you want search engines to know about. It doesn't guarantee ranking, but it removes a common failure point: pages that exist but never get discovered because nothing links to them clearly enough for a crawler to find on its own.
Why it matters
- Discovery — new or deep pages with few internal links can take a long time to be crawled without a sitemap pointing directly at them.
- Priority signals — a sitemap can hint which pages matter most and how often they change, though search engines treat this as a suggestion, not a guarantee.
- Large sites — the bigger the site, the more a sitemap matters, since crawlers have a limited "budget" for how many pages they'll check on any given visit.
What a valid sitemap looks like
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://example.com/page</loc>
<lastmod>2026-08-01</lastmod>
<priority>0.8</priority>
</url>
</urlset>
Building yours
- List every URL you want indexed with the Sitemap Generator — paste in your page list or URLs.
- Download the generated
sitemap.xmland upload it to your site's root directory. - Submit the sitemap URL (e.g.
https://yoursite.com/sitemap.xml) in Google Search Console and Bing Webmaster Tools. - Reference it in your
robots.txtfile with a line likeSitemap: https://yoursite.com/sitemap.xmlso crawlers that don't check Search Console directly can still find it.
Keeping it accurate
A sitemap listing pages that no longer exist, or missing pages that were added recently, works against you — search engines can start trusting the file less if it's frequently wrong. Regenerate it whenever you add, remove, or restructure a meaningful number of pages.