XML Sitemap: Help Search Engines Discover Important URLs
An XML sitemap is a file that provides search engines with information about URLs that are important on your website. It can help search engines discover new or updated pages, particularly on large websites or sites with complex structures.
A sitemap does not guarantee that a URL will be crawled or indexed. Think of it as a discovery signal rather than a command to search engines.
What Should Be in an XML Sitemap?
Where Is the Sitemap Located?
A common sitemap location is:
https://example.com/sitemap.xmlSome CMS platforms generate sitemaps automatically and may use a sitemap index containing multiple sitemap files.
Basic XML Sitemap Example
<?xml version="1.0" encoding="UTF-8"?>
<urlset
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
>
<url>
<loc>https://example.com/</loc>
</url>
<url>
<loc>https://example.com/technical-seo-guide</loc>
</url>
<url>
<loc>https://example.com/blog/ai-seo-guide</loc>
</url>
</urlset>What Makes a Good Sitemap?
| Good Practice | Potential Problem |
|---|---|
| Include important canonical URLs | Include URLs that redirect elsewhere |
| Keep sitemap URLs accessible | Include URLs blocked from crawling |
| Keep sitemap data current | Leave removed URLs indefinitely |
| Use valid XML | Broken or malformed XML |
| Use sitemap indexes for large sites when appropriate | Put an unnecessarily large number of URLs into one file |
Sitemap Types
URL Sitemap
The standard sitemap format for communicating important website URLs.
Sitemap Index
A file that references multiple sitemap files, useful for larger websites.
Image Sitemap
Can provide additional information about images when an image sitemap is appropriate.
Video Sitemap
Can provide structured information about video content.
XML Sitemap Checklist
Sitemap and Robots.txt
A sitemap and robots.txt serve different purposes. The sitemap helps communicate important URLs, while robots.txt provides crawler access instructions for URL paths.
Sitemap
Helps search engines discover important URLs.
Robots.txt
Provides crawler access instructions for URL patterns.
SEOHACK Tip
Related Technical SEO Guides
Continue learning with these related Technical SEO resources.
Technical SEO Crawling
Improve crawlability and help search engines discover your pages.
Read Guide →Site Architecture
Build a logical website structure that supports SEO and users.
Read Guide →SEO URL Structure
Create clean, logical and search-friendly URLs.
Read Guide →Robots.txt
Control crawler access and avoid common robots.txt mistakes.
Read Guide →Ready to Improve Your
Google & AI Rankings?
Analyze your website in under 60 seconds and receive a professional SEO report with Technical SEO, AI SEO, Performance, GEO, AEO and actionable recommendations.
SEOHACK Editorial Team
The SEOHACK Editorial Team creates practical, research-driven content focused on Technical SEO, AI SEO, Generative Engine Optimization (GEO), Answer Engine Optimization (AEO), Local SEO, Performance Optimization and website growth.