If you have ever opened sitemap.xml and wondered how many pages it really lists, or whether an index file is hiding half your site, you need a reliable way to count sitemap links. Search engines treat the sitemap as a hint, not a guarantee, so the file itself should stay accurate: every important URL present, no huge stubs, no broken child files. This guide explains how XML sitemaps and indexes work, how WordPress builds /wp-sitemap.xml, and how to audit totals quickly. When you are ready to measure a live file, open our free Sitemap Link Counter, enter the URL, review the total and child breakdown, then copy every link at once.
Count your sitemap now: Open the Sitemap Link Counter, XML urlset and sitemap index support, View list, and Copy all. No signup.
What is an XML sitemap?
An XML sitemap is a structured list of URLs on your site. The simplest form is a urlset: each <url> block holds a <loc> (the page address) and optional tags like lastmod. Search engines use that list to discover and prioritize crawling. It does not replace good internal links, but it is one of the cleanest signals you can give crawlers after a redesign, migration, or large publish burst.
When a site grows past a few thousand URLs, you usually switch to a sitemap index. The index file does not list pages directly, it lists other sitemap files. Counters that only read the index without following children will undercount badly.
Sitemap index vs urlset
| Type | Root element | Contains | How to count |
|---|---|---|---|
| URL set | urlset |
Page (or media) locs | Count every <loc> under <url> |
| Sitemap index | sitemapindex |
Child sitemap locs | Fetch each child, then sum their page locs |
Our counter detects both roots automatically and shows a breakdown by child sitemap when you submit an index, useful for spotting a CPT or taxonomy file that returned zero.
How WordPress sitemaps work
Modern WordPress ships a built-in sitemap at /wp-sitemap.xml. That file is typically an index pointing to children such as:
wp-sitemap-posts-post-1.xml, blog postswp-sitemap-posts-page-1.xml, pageswp-sitemap-posts-{cpt}-1.xml, custom post types (tools, guides, products)wp-sitemap-taxonomies-*.xml, categories, tags, custom taxonomieswp-sitemap-users-1.xml, author archives when enabled
Plugins may replace or extend that structure. Whatever the host uses, the audit method is the same: start at the index URL, follow children, total the locs.
Step-by-step: count and export every URL
- Open the Sitemap Link Counter.
- Paste your sitemap or index URL (HTTPS preferred).
- Click Count links and wait for the total.
- Expand Breakdown by child sitemap if you submitted an index.
- Click View list, then Copy all to paste into a spreadsheet, QA checklist, or diff tool.
- If the remote fetch fails, paste the XML from your browser and use Count pasted XML.
SEO use cases
| Scenario | Why count helps |
|---|---|
| Search Console coverage mismatches | Compare “Indexed” / “Discovered” against sitemap totals |
| Site migration | Baseline URL count before cutover; re-check after redirects |
| New CPT launch | Confirm the CPT child sitemap exists and is non-empty |
| Thin or orphan content audits | Export locs and cross-check against analytics or CMS exports |
| Agency reporting | Show clients a concrete “pages in sitemap” number with a list |
Common mistakes
| Mistake | Problem | Fix |
|---|---|---|
| Counting only one child file | Undercounts the site | Always start from the index URL |
| Assuming sitemap = indexed | Google may skip low-quality or blocked URLs | Use Search Console + robots.txt checks together |
| Leaving draft or noindex URLs in the map | Wastes crawl budget and confuses audits | Exclude non-public content in CMS settings |
| Broken child sitemap returns 404 | Index looks fine; totals look wrong | Use the child breakdown to find the failing file |
| Blocking the sitemap in robots.txt | Crawlers never see the map | Allow the sitemap path; keep a Sitemap: line |
Limits and good practice
Public specs traditionally suggest keeping individual sitemap files under 50,000 URLs (and under a size cap). Indexes exist so you can split cleanly. When auditing huge sites, expect the printable list to be capped for browser performance even when the total still reflects everything counted within tool limits, that is intentional.
Never point a public counter at private staging hosts that should stay off the internet. Prefer production HTTPS sitemaps, or paste XML from a secure environment you control.
Related developer utilities
After you export locs, you may need to fix encoding issues in query strings with the URL Encode & Decode tool, or mint opaque IDs with the UUID Generator. Keep this guide bookmarked for the audit checklist, and use the counter whenever you ship a large content batch.
Count your next sitemap
Open the ShoutingNow Sitemap Link Counter, paste sitemap.xml or wp-sitemap.xml, review the total, and copy the full URL list in one click. Free, fast, and built for SEO and developer workflows.