An XML sitemap gives search engines a list of important URLs on your website. XML sitemap SEO can be especially helpful when a site is new, large, or difficult to navigate through links alone. Start with a simple rule: include pages you want search engines to discover and consider for search results, not every URL your site can produce.
A sitemap does not guarantee that a page will be crawled, indexed, or ranked. It’s a discovery aid, not a substitute for useful content, accessible pages, and clear internal links. This guide covers what to include, how to create a sitemap, and how to check that it’s working as intended.
How XML sitemap SEO supports discovery
An XML sitemap is a file that lists URLs on your site in a format search engines can read. It may also provide details such as when a page was last meaningfully updated. Search engines can use the file to discover URLs, but they still decide whether and when to crawl and index them.
Sitemaps are most useful when some pages are not easy to reach through your site’s normal link structure. This can happen on a newer website with few external links, a large site with many sections, or a site whose pages are added or updated frequently. A small, well-linked website may receive less benefit, but maintaining a clean sitemap is usually straightforward.
Think of your sitemap as a curated list rather than a complete export of your website. A URL in the file should generally be a page that is available to visitors, worth showing in search results, and the preferred version of that page.
Choose which URLs belong in your sitemap
Before generating a sitemap, decide which page types should be included. Most sites should list their main pages, useful articles, product or service pages, and other original content they want search engines to find.
Review each URL against these checks:
- It returns a successful page response. Remove URLs that lead to errors or redirect elsewhere.
- It can be indexed. Don’t list pages blocked from indexing by a noindex instruction or other site rules.
- It is the preferred URL. Use the canonical version rather than a duplicate, parameterized, or alternate URL. For help identifying the preferred version, see how to use canonical tags to consolidate duplicate URLs.
- It offers distinct value. Avoid adding thin archives, internal search results, test pages, or pages that repeat other content without a useful reason to exist.
For example, an online store might include its canonical product and category pages, but leave out cart pages, filtered URLs that create many variations, and account pages. A blog might include its articles and key topic pages, while excluding internal search results and duplicate tag archives that don’t serve readers.
Don’t add a URL merely because it exists. A sitemap full of redirects, duplicates, and pages you don’t want indexed sends a less useful signal and makes troubleshooting harder.
How to create an XML sitemap
The easiest method depends on how your website is built. Many content management systems and SEO plugins generate a sitemap automatically. Look for a sitemap setting in your site or plugin dashboard, then confirm which content types it includes. Avoid enabling several sitemap generators at once, since they can create overlapping files or make it unclear which sitemap is current.
For a custom-built website, your developer or content platform can generate the file from the pages you’ve chosen to include. The sitemap needs to use a format search engines can parse, and each listed URL should use its full, preferred address. If your site has a large number of URLs, it may use a sitemap index that points to multiple sitemap files. Most small business sites can rely on their platform’s default setup.
After generation, open the sitemap URL in a browser. It often ends in .xml, though the exact path varies by platform. You should see a readable XML document or a formatted view listing URLs, not an error page, a login screen, or a redirect to an unrelated location.
Check the sitemap before submitting it
A sitemap can load successfully while still containing the wrong URLs. Spot-check several entries, including a recent page and an important older page. Confirm that each opens at the intended address and that its page isn’t marked as unavailable to search engines.
For a larger site, use a crawler or sitemap validation tool to compare the listed URLs with the site’s actual pages. Look for:
- URLs that redirect to a different address
- Pages returning errors or requiring a login
- Duplicate URLs with different parameters or protocol variations
- Pages that are blocked from indexing
- Important indexable pages missing from the file
Pay attention to any last-modified information your system includes. It should reflect a meaningful change to the page, not a routine automated refresh. An accurate date can help search engines understand when content changed; an inaccurate date isn’t a shortcut to more frequent crawling.
If a page is missing from the sitemap, check whether its content type is excluded in your platform settings, whether the page is set to noindex, or whether its URL is being treated as a duplicate. Fix the cause rather than adding a second, conflicting URL by hand.
Submit your sitemap and monitor it
Once you’ve checked the file, submit its URL through Google Search Console’s Sitemaps report. You can also include the sitemap location in your site’s robots.txt file so crawlers can find it. Submission helps make the file known to search engines, but it doesn’t force them to index every listed page.
After submission, review the report for processing issues and examples of URLs that couldn’t be read. A reported problem may point to an inaccessible file, an invalid URL, or a mismatch between the sitemap and your site’s indexing rules. Correct the underlying issue, then allow the report time to reflect the updated file.
Keep the sitemap current as you publish, remove, or reorganize pages. If you delete a URL, remove it from the sitemap. If it redirects to a replacement, list the destination URL rather than the old one. For broader site changes, check that your redirects and canonical settings agree with the URLs in the file.
Common XML sitemap mistakes to avoid
Expecting a sitemap to fix indexing on its own. A listed URL can still be excluded if it is low value, duplicated, inaccessible, or blocked. Check the page itself as well as the sitemap.
Listing every URL the platform creates. Faceted filters, tracking parameters, internal search pages, and alternate versions can multiply URLs without adding useful content. Keep the file focused on canonical pages.
Using the sitemap instead of internal links. Important pages should be reachable from relevant navigation or other pages on your site. Internal links help visitors move around and give crawlers useful paths to discover content.
Leaving stale URLs in place. When pages are removed or replaced, update the sitemap so it reflects the current site. A quick review after a redesign or a major content cleanup can prevent avoidable confusion.
A useful XML sitemap is accurate, easy to access, and limited to pages you want search engines to consider. Generate it with your platform when possible, check its contents, submit it through Search Console, and revisit it when your site changes. That gives crawlers a cleaner set of URLs to discover while keeping your broader SEO work focused on pages that genuinely help your audience.
