What Is a Sitemap?
A sitemap is a file — typically in XML format — that lists all the important pages, posts, and other content on your website. It acts as a roadmap for search engine crawlers, helping them discover and index your content more efficiently. Think of it as handing Google a table of contents for your entire site.
There are two main types of sitemaps:
- XML Sitemaps — designed for search engines. Located at a URL like
yourdomain.com/sitemap.xml. - HTML Sitemaps — designed for human visitors. A page on your site that links to all major sections.
Why Do Search Engines Need a Sitemap?
Search engines discover pages primarily through links — they follow links from one page to the next. But this process isn't perfect. Pages that are:
- Not linked from any other page (orphan pages)
- Deep within your site's navigation structure
- Newly published and not yet linked anywhere
- Part of a large or frequently updated site
…may be missed or take a long time to be crawled. A sitemap solves this by explicitly telling search engines every URL that should be indexed.
What Does an XML Sitemap Look Like?
An XML sitemap is a structured text file. Here's a simplified example:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://www.yourdomain.com/</loc>
<lastmod>2025-01-01</lastmod>
<changefreq>weekly</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>https://www.yourdomain.com/about</loc>
<lastmod>2024-11-10</lastmod>
<priority>0.8</priority>
</url>
</urlset>
Key fields include <loc> (the URL), <lastmod> (last modified date), <changefreq> (how often it changes), and <priority> (relative importance, from 0.0 to 1.0).
How to Create a Sitemap
If You Use a CMS (WordPress, etc.)
Most modern content management systems handle sitemaps automatically. WordPress users can install a plugin like Yoast SEO or Rank Math — both generate and maintain an up-to-date XML sitemap without any manual effort.
For Static or Custom Sites
You can generate a sitemap using free online tools by entering your domain URL. Tools like XML-Sitemaps.com will crawl your site and produce a ready-to-upload sitemap file. Alternatively, if you manage your site through code, most static site generators (Hugo, Jekyll, Eleventy) have built-in sitemap generation.
How to Submit Your Sitemap to Search Engines
- Google Search Console — Go to your property, navigate to Sitemaps in the left menu, and enter your sitemap URL (e.g.,
/sitemap.xml). - Bing Webmaster Tools — Similar process under the Sitemaps section.
- robots.txt — Add a line like
Sitemap: https://yourdomain.com/sitemap.xmlto your robots.txt file. Most crawlers will pick this up automatically.
Sitemap Best Practices
- Only include canonical, indexable URLs — don't add pages you've blocked with noindex tags.
- Keep your sitemap up to date. Outdated sitemaps with removed pages can confuse crawlers.
- For large sites, use sitemap index files to split content into multiple sitemap files.
- Include image and video sitemaps if your site relies heavily on rich media content.
A sitemap is a small investment of time that can meaningfully improve how quickly and completely your content gets indexed. If your site doesn't have one, creating it should be near the top of your to-do list.