A sitemap lists the URLs you want search engines to discover. For SEO, this usually means an XML file containing the preferred versions of public pages, optionally with meaningful last-modified dates.
Start by finding the existing file at /sitemap.xml, /sitemap_index.xml, /wp-sitemap.xml, or in the Sitemap: lines of /robots.txt. Open any child sitemap listed by an index, then search for the exact URL you need. These are common locations, rather than required filenames.
Use the Sitemap Checker and Validator to inspect the file and the Google Index Checker to pre-check a page’s live signals. A successful sitemap and an indexed page are separate outcomes; confirm Google’s recorded status in Search Console.
What Is a Sitemap?
A sitemap is a file or page that lists selected URLs on a website. An SEO sitemap should focus on the canonical pages you want in search, rather than every login, filter, redirect or tracking URL a site can generate.
There are two main types: XML sitemaps for search engines and HTML sitemaps for human visitors. They serve different purposes and often both exist on the same site.
XML Sitemap
An XML sitemap is a structured, machine-readable file, typically located at yourdomain.com/sitemap.xml. It lists your important URLs along with optional metadata like the last modified date.
Here is what a minimal XML 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/</loc>
<lastmod>2025-07-01</lastmod>
</url>
<url>
<loc>https://example.com/services/</loc>
<lastmod>2025-06-15</lastmod>
</url>
<url>
<loc>https://example.com/our-first-post/</loc>
<lastmod>2025-07-10</lastmod>
</url>
</urlset>
This is what Google’s crawler reads when it processes your sitemap.
HTML Sitemap
An HTML sitemap is a regular page on your website, usually linked from the footer, that lists all major sections and pages. It helps human visitors find content on large or complex sites.
An HTML sitemap provides ordinary crawlable links as well as navigation for visitors. An XML sitemap serves a different task: submitting a machine-readable URL inventory. Neither replaces useful contextual links between pages.
XML vs HTML Sitemaps at a Glance
| Feature | XML Sitemap | HTML Sitemap |
|---|---|---|
| Primary audience | Search engine crawlers | Human visitors |
| Format | Machine-readable XML file | Standard HTML web page |
| SEO impact | High: speeds up discovery and indexing | Low to moderate: improves internal links |
| Submission | Submitted to Search Console | Not submitted, linked normally |
| Required? | Strongly recommended | Optional |
| Best for | Large, new or media-heavy sites | Large sites with complex navigation |
Why Sitemaps Matter for SEO
Search engines can discover URLs by following links and reading sitemaps. A sitemap supplies an explicit inventory; internal links also help users reach the content and understand its place on the site.
Crawl Budget Efficiency
For very large or rapidly changing sites, unnecessary duplicate URL inventories can consume crawling resources. Google’s crawl-budget guidance distinguishes crawl capacity from crawl demand; most smaller sites do not need advanced crawl-budget work.
A current sitemap, consistent canonical URLs and reliable responses make the intended inventory easier to inspect. A good Core Web Vitals result is not an allocation of more crawl budget, and blocking a section in robots.txt does not automatically transfer crawling to another one.
Faster Indexing for New Content?
New pages need discoverable URLs. Link them from relevant existing pages and include them in the sitemap when you want them indexed.
Submitting a sitemap through Google Search Console gives Google another discovery route and gives you processing evidence. It does not set a crawl or indexing deadline. Google’s sitemap overview explicitly separates discovery from guaranteed crawling and indexing.
Orphaned Page Discovery
Orphaned pages have no internal links pointing to them. A sitemap may expose their URLs to crawlers, but visitors still need a useful route to them. Add appropriate navigation or contextual links instead of leaving discovery dependent on the sitemap alone.
This is especially relevant after site migrations or redesigns, where pages often get orphaned unintentionally. A solid technical SEO audit will surface these issues.
Metadata Communication
Beyond URLs, XML sitemaps can communicate useful signals: when a page was last modified (<lastmod>), what type of content it contains (via sitemap extensions for images, video, or news), and how pages are organized relative to each other via sitemap index files.
Types of Sitemaps
The standard XML sitemap handles most use cases, but Google supports specialized sitemap formats for richer content types.
| Sitemap Type | What It Covers | Best For | Special Tags |
|---|---|---|---|
| XML Sitemap | Standard web pages | All websites | loc, lastmod |
| Image Sitemap | Images embedded in pages | Photography, e-commerce | image:image, image:loc |
| Video Sitemap | Hosted video content | Media sites, courses | video:title, video:duration |
| News Sitemap | Recent news articles (48 hrs) | News publishers | news:publication, news:title |
| Sitemap Index | References to multiple sitemaps | Large sites (50K+ URLs) | sitemap, loc, lastmod |
Image Sitemaps
Google cannot always discover all images on a page through crawling alone, especially when images are loaded via JavaScript or CSS. An image sitemap extension provides that metadata directly.
Use the supported image:image and image:loc elements. Google deprecated the image caption, title, geo-location and license sitemap tags; these are not current image-sitemap recommendations. Visible captions and appropriate image metadata serve separate purposes.
News Sitemaps
News sitemaps are specifically designed for Google News inclusion. They only list articles published within the past 48 hours and require the news: namespace extension. If you run a news publication or frequently publish time-sensitive content, this is worth implementing.
Sitemap Index Files
When your site has more than 50,000 URLs, or when you want to organize your sitemap by content type for easier monitoring, you use a sitemap index file. The index file itself is an XML file that simply lists the locations of your individual sitemaps:
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://example.com/sitemap-pages.xml</loc>
<lastmod>2025-07-01</lastmod>
</sitemap>
<sitemap>
<loc>https://example.com/sitemap-blog.xml</loc>
<lastmod>2025-07-19</lastmod>
</sitemap>
<sitemap>
<loc>https://example.com/sitemap-products.xml</loc>
<lastmod>2025-07-20</lastmod>
</sitemap>
</sitemapindex>
You submit the index file URL to Google Search Console, and it automatically processes all the referenced child sitemaps.
What an XML Sitemap Looks Like (Example and Tags)
An XML sitemap is a list of <url> entries inside one <urlset> element. Each entry needs a <loc> with the page’s full URL; the other tags are optional:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://example.com/services/</loc>
<lastmod>2026-10-01</lastmod>
</url>
</urlset>
Understanding what each tag does helps you build a sitemap that communicates the right signals.
| Tag | Required? | Purpose | Google Uses It? |
|---|---|---|---|
| <urlset> | Yes | Root element, declares the namespace | Yes (required) |
| <url> | Yes | Container for each page entry | Yes (required) |
| <loc> | Yes | Absolute URL of the page | Yes |
| <lastmod> | No | Date the page was last modified (ISO 8601) | Yes (when accurate) |
| <changefreq> | No | How often the page changes | No (ignored by Google) |
| <priority> | No | Relative importance (0.0 to 1.0) | No (ignored by Google) |
Two important takeaways from this table: the <changefreq> and <priority> tags are ignored by Google. Setting every page to priority="1.0" does nothing. Focus your effort on accurate <lastmod> dates instead, as Google does use those to determine which pages to recrawl.
Always use absolute URLs in <loc> tags (starting with https://), encode special characters properly (ampersands as &), and use UTF-8 encoding throughout.
How to Create a Sitemap by Platform
WordPress
WordPress has included a built-in XML sitemap since version 5.5, usually at /wp-sitemap.xml when indexing is enabled. SEO plugins can replace or extend it; a plugin is not required just to have a sitemap. Two common options are:
Yoast SEO: Automatically generates a sitemap index at yourdomain.com/sitemap_index.xml with separate sitemaps for posts, pages, categories, and authors. Configure which post types to include under SEO Settings, then re-check whenever you add new content types.
Rank Math: Similar functionality with slightly more granular control. Both are solid options. You do not need both.
After installing either plugin, verify the sitemap exists by visiting the URL directly in your browser. You should see valid XML. Then submit the URL to Google Search Console.
Shopify
Shopify automatically generates a sitemap at yourdomain.com/sitemap.xml. It includes all published products, collections, blogs, and pages. You cannot directly edit it, but you control what appears by publishing or hiding content in the Shopify admin.
Submit the auto-generated sitemap to Google Search Console and Bing Webmaster Tools. Shopify handles the regeneration automatically as you add products or pages.
Squarespace and Wix
Both platforms automatically generate and maintain XML sitemaps. Squarespace places its sitemap at yourdomain.com/sitemap.xml. Wix generates one at the same URL. Neither requires manual intervention, though submitting the URL to Search Console is still your responsibility.
Custom or Framework-Based Sites
For sites built with custom code, static site generators (like Astro, Next.js, or Hugo), or headless CMS setups, you have three options:
-
Framework plugins: Most static site frameworks have sitemap plugins. Astro has
@astrojs/sitemap. Next.js hasnext-sitemap. These auto-generate sitemaps at build time. -
Dynamic generation: Build a server-side route that queries your database or CMS at request time and outputs valid XML. This ensures the sitemap always reflects the current state of your site.
-
Third-party generators: Tools like Screaming Frog, XML-Sitemaps.com, or Sitebulb can crawl your site and generate a sitemap file. Best for smaller static sites where automation is not needed. Our free Sitemap Generator is another option for quickly producing a clean, submit-ready XML sitemap.
For custom-built sites, our team at Web Aloha typically implements dynamic sitemap generation so your sitemap stays current automatically, regardless of how often content changes.
Static vs Dynamic Sitemaps
A static sitemap is a file you manually create and upload. It works for sites that rarely change, but quickly becomes outdated.
A dynamic sitemap is generated programmatically, either at build time or on each request. It reflects the current state of your site without any manual effort.
Choose a manual file when the URL inventory is small, changes rarely, and someone will maintain it whenever pages change.
Choose dynamic if your site has a blog, product catalog, or any content that changes regularly. The operational overhead of keeping a manual sitemap accurate is rarely worth it.
How to Submit Your Sitemap to Google Search Console
Getting a sitemap generated is only half the work. You need to tell Google where it is.
Step-by-Step: Google Search Console
- Sign in to Google Search Console
- Select your property (verify ownership first if you have not already)
- In the left sidebar, click Indexing, then Sitemaps
- In the “Add a new sitemap” field, enter your sitemap URL (just the path, e.g.,
sitemap.xml) - Click Submit
Use the Sitemaps report to review processing status, last read and discovered URLs. A Success status means the file was processed, not that every listed page is indexed. Use Page indexing with a sitemap filter, then URL Inspection for individual pages. See Google’s Sitemaps report documentation and our Search Console guide.
Step-by-Step: Bing Webmaster Tools
- Sign in to Bing Webmaster Tools
- Select your site
- Go to Sitemaps in the left menu
- Click Submit sitemap and enter your full sitemap URL
- Click Submit
Bing powers search results across Bing, DuckDuckGo, and several other engines. It is worth the two-minute submission. Many site owners skip this and leave meaningful traffic on the table.
Also: Add Your Sitemap to robots.txt
Reference your sitemap from your robots.txt file. This allows any crawler, not just Google and Bing, to discover your sitemap automatically:
User-agent: *
Disallow: /admin/
Sitemap: https://yourdomain.com/sitemap.xml
Use our free Robots.txt Generator to create a properly formatted robots.txt file. For a deeper look at how robots.txt interacts with sitemaps and AI crawlers, see our robots.txt guide.
How Search Engines Use Your Sitemap
Understanding the flow from sitemap submission to page indexing helps you troubleshoot when something is not working.
| Stage | What Happens | Evidence to Check |
|---|---|---|
| 1. Discovery | Google finds your sitemap via Search Console submission or robots.txt | Submitted sitemap URL and robots.txt reference |
| 2. Fetch | Googlebot downloads the sitemap file and parses the URL list | Sitemap status, last read and parsing errors |
| 3. Queue | Google knows a listed URL but may not have crawled it yet | URL Inspection discovery and crawl information |
| 4. Crawl | Googlebot visits each URL, processes the HTML, evaluates content and signals | Recorded crawl date, fetch result and crawled HTML |
| 5. Index Decision | Google decides whether to add the page to its index based on quality, canonicalization, and directives | Indexed status, reported reason and Google-selected canonical |
| 6. Ranking | Indexed pages compete in search results based on relevance, authority, and quality signals | Page-level search performance for the relevant dates and queries |
A sitemap supports discovery and supplies a weak canonical preference. It does not guarantee processing of every page or a ranking outcome. Check each stage separately rather than treating the list as a timed pipeline.
Sitemap Best Practices
Only Include Indexable URLs
This is the most important rule. Your sitemap should only contain pages you want indexed. Exclude:
- Pages with a
noindexmeta tag - Pages blocked by robots.txt
- Redirected URLs (301s and 302s)
- Pages returning 4xx or 5xx status codes
- Thin, duplicate, or session-parameterized URLs
- Admin, login, and thank-you pages
Including unwanted or non-canonical URLs makes your submitted inventory less useful for diagnosis. Compare it with the pages you actually want in search and investigate specific mismatches.
Keep Sitemap Files Under Limits
Each sitemap file: maximum 50,000 URLs and 50MB uncompressed. Exceeding either limit means Google may not process the entire file.
For large sites, use a sitemap index with segmented child sitemaps. Segment by content type (blog, products, landing pages) rather than arbitrarily splitting alphabetically. This makes it easier to diagnose indexing issues for specific content sections.
Use Accurate lastmod Dates
If you use <lastmod>, make sure it reflects a real, meaningful content update. Do not update it just to nudge Google into recrawling a page. Google learns over time if your <lastmod> values are trustworthy. If they are frequently inaccurate, Google ignores them entirely.
Good CMS integrations and dynamic sitemap scripts pull the last-modified date directly from the database record, keeping it accurate automatically.
Reflect the Canonical URL
Every URL in your sitemap should be the preferred canonical version of that page. If you use canonical tags to point variants to a primary URL, list the primary URL. Conflicting preferences make the intended inventory harder to interpret; canonical annotations are signals rather than directives.
Compress Large Sitemaps
Sitemap files can be gzip-compressed to reduce transfer size. The 50MB limit applies to the uncompressed file, alongside the 50,000-URL limit. Split files that exceed either limit and check them against Google’s sitemap build guidance.
Common Sitemap Mistakes and How to Fix Them
Even well-intentioned sitemaps often contain problems that reduce their effectiveness. A technical SEO audit will typically surface these.
Including Redirect URLs
URLs that redirect to another page should never appear in the sitemap. Include the final destination URL instead. Submitting redirect URLs wastes crawl budget and confuses crawlers.
Fix: Audit your sitemap with a crawler tool like Screaming Frog. Filter for non-200 status codes. Remove any URLs that redirect, return errors, or are no longer live.
Inconsistent URL Formats
Mixing https:// and http://, including and excluding trailing slashes, or using both www and non-www versions creates multiple entries for what should be the same page.
Fix: Standardize the preferred URLs in your sitemap, canonical tags and internal links. Inspect the same exact URL in a Search Console property that contains it. Use our XML Sitemap Validator to inspect the listed URL formats.
Forgetting to Update After Site Changes
A stale sitemap can miss new URLs or keep advertising retired ones. It does not automatically remove pages from Google’s index. Keep it aligned with the published inventory after launches, moves and retirements.
Fix: Use a dynamic sitemap generated by your CMS or framework. If manual management is unavoidable, schedule a monthly audit to compare your sitemap against your actual page inventory.
Not Submitting to Search Console
Google can discover a sitemap through robots.txt without a Search Console submission. Submitting it also gives you processing status and errors in the Sitemaps report, which is useful for monitoring and troubleshooting.
Fix: Submit your sitemap through Google Search Console and Bing Webmaster Tools. Review sitemap processing and Page indexing reports periodically.
Setting Every Page to Priority 1.0
This is a widespread but harmless mistake, since Google ignores the <priority> tag anyway. But it reveals a misunderstanding: if every page is “highest priority,” no prioritization has occurred. Focus on keeping your sitemap clean instead.
When You Might NOT Need a Sitemap
Google’s own documentation says sitemaps provide the most value for: large sites, sites with rich media (video, images), new sites without many external links, and sites with deep content hierarchies.
Google says a small site, roughly 500 pages or fewer, may not need a sitemap if it is comprehensively linked internally and has no special media or news requirements. That is guidance about discoverability, rather than a required page-count threshold.
That said, a sitemap costs almost nothing to add, and it can help URL discovery; faster or complete indexing is not guaranteed. There is rarely a good reason not to have one. The SEO for small businesses fundamentals we recommend include a sitemap from day one.
Monitoring Sitemap Health Over Time
Submitting your sitemap is not a one-time task. Regular monitoring catches problems before they affect your rankings.
Google Search Console Page indexing report
The Sitemaps report shows processing and discovered URL information. In Page indexing, filter by the submitted sitemap to inspect indexed and not indexed URLs and their reported reasons. Common reasons include:
- “Crawled, currently not indexed” (Google crawled but chose not to index)
- “Duplicate, Google chose different canonical than user” (inspect whether the selection is appropriate)
- “Blocked by robots.txt” (a crawling restriction, not necessarily an indexing ban)
- “Page with redirect” (the inspected URL redirects; check whether that is intended)
- “Redirect error” (Google encountered a redirect problem, such as a loop or an excessively long chain)
Prioritize pages you want indexed and inspect their specific reasons. A submitted-versus-indexed gap alone does not establish a broken sitemap. Our Google Search Console guide explains how to interpret each status.
Sitemap Success, but a Page Is Still Not Indexed
Confirm that the exact preferred URL appears in a child sitemap, then inspect that URL in Search Console. Record the last crawl date, fetch result, indexing permission and Google-selected canonical. A live check describes the current response; it does not update Google’s recorded result.
If crawling succeeded and the canonical matches, do not assume the sitemap is broken. Review the crawled HTML, important content and links, and any equivalent page before deciding what to change. “Crawled - currently not indexed” is an observed status, not proof of a particular technical or content-quality defect. After an evidenced fix, compare a later crawl with the recorded baseline.
Track Index Coverage with a Checker
Use our free Google Index Checker to pre-check one priority URL for live technical blockers and sitemap discovery evidence. Confirm whether Google has indexed the URL with Search Console URL Inspection; the public checker does not query Google’s index.
Validate Sitemap Syntax Regularly
XML syntax errors in your sitemap file can prevent Google from parsing it entirely. Use our XML Sitemap Validator to confirm your sitemap is well-formed before and after any significant site changes.
Watch for Sitemap Fetch Errors in Search Console
If Google cannot fetch your sitemap file because of a server error, authentication requirement or firewall block, review the failure in the Sitemaps report. Test the exact file and any child sitemap after fixing access, then confirm a successful subsequent read.
Sitemaps in the Context of Your Overall SEO Strategy
A sitemap is one component of a broader technical foundation. It works alongside your robots.txt configuration, canonical tag implementation, internal linking structure, Core Web Vitals performance, and structured data markup.
Sitemaps help with discovery. Rankings come from quality signals: content relevance, E-E-A-T authority, page experience, and backlinks.
For businesses wondering whether SEO is worth the investment: the technical foundation, including a properly maintained sitemap, is the prerequisite that makes everything else work. You can write excellent content and build strong links, but if Google cannot efficiently crawl and index your site, those efforts are limited.
If you are unsure whether your site has sitemap issues, our SEO services include a full technical audit as part of every engagement. We check sitemap health, coverage gaps, canonical conflicts, and crawl efficiency as part of the baseline setup.
Frequently asked questions
What is an XML sitemap?
An XML sitemap lists URLs you want search engines to discover, usually their preferred canonical versions, with optional metadata such as meaningful last-modified dates. It helps discovery but does not guarantee that a listed URL will be crawled, indexed or ranked.
Does Google require a sitemap?
No. Google says a small site, about 500 pages or fewer, may not need one when all important pages are reachable through internal links and there are no special media or news requirements. Sitemaps are especially useful for large or new sites and for image, video or news discovery.
How often should I update my sitemap?
Your sitemap should be updated every time you add, remove, or significantly update a page. For most sites, this means using a dynamic sitemap that regenerates automatically via a CMS plugin or framework. If you manage your sitemap manually, audit it at least once per month to remove dead URLs and add new pages.
What is the difference between an XML sitemap and an HTML sitemap?
An XML sitemap is a machine-readable file designed for search engine crawlers. An HTML sitemap is a human-readable page that helps visitors navigate large websites. Both can coexist on the same site. For SEO purposes, the XML sitemap is what matters most.
How do I submit my sitemap to Google?
Log in to Google Search Console, select your property, navigate to Indexing then Sitemaps in the left sidebar, enter your sitemap URL (usually yourdomain.com/sitemap.xml), and click Submit. Google will then crawl your sitemap and report any errors it finds.
Should I include noindex pages in my sitemap?
No. Pages marked with a noindex directive should never appear in your sitemap. Including them sends a contradictory signal to search engines: you are both telling them not to index the page and inviting them to visit it via the sitemap. Only include pages you actively want indexed.
What is sitemap_index.xml (a sitemap index file)?
sitemap_index.xml is a common name for a sitemap index file: a parent sitemap that lists child sitemaps, such as one for posts and one for products, instead of page URLs. Yoast SEO and Rank Math publish theirs at /sitemap_index.xml, while WordPress without a sitemap plugin uses /wp-sitemap.xml. Use an index when one file would pass 50,000 URLs or 50 MB, or to split sitemaps by content type for easier monitoring.
Does sitemap priority actually affect rankings?
No. Google ignores priority and changefreq. It can use lastmod when the date is consistently accurate and reflects a significant update to the page. A new sitemap timestamp or priority value is not a ranking instruction.
Can I have multiple sitemaps?
Yes. Large sites routinely use multiple sitemaps organized by content type: one for blog posts, one for product pages, one for images, one for videos. These are all referenced from a sitemap index file. Each individual sitemap file is limited to 50,000 URLs and 50MB uncompressed.
What tools can I use to validate my sitemap?
You can validate your sitemap with Google Search Console (which reports errors after submission), Web Aloha's free XML Sitemap Validator tool, or by running it through an XML validator to check for syntax errors. Always verify that every URL in your sitemap returns a 200 status code and is actually indexable.