PageSourceSearch

https://sitemapwatch.com/assets/sitemap-url-counter-BXIjhTbL.js

js sitemapwatch.com collected 2026-10-02 00:33:56 UTC 8,508 bytes, 1 lines download raw bytes

1import{j as e,r as c,R as p,L as U}from"./main-BImpsluT.js";import{T as L,a as R,b}from"./tool-shell-CFlKo-7l.js";import{B as j}from"./badge-BKSYEar2.js";import{C as n,a as y,b as S,c as w}from"./card-DGNb_koZ.js";import{T as N,a as v,b as f,c as x,d as C,e as g}from"./table-Cnek-Uft.js";import{S as T}from"./sitemap-result-summary-DBdm167l.js";import{S as q}from"./sitemap-url-list-DuKKrZ_Z.js";import{U as E}from"./url-input-form-Tt-6dYXm.js";import"./createServerFn-CBixcFYN.js";import"./useRender-BSxwdxRH.js";import"./alert-aUQmmjpD.js";import"./input-ClxBbEig.js";import"./useField-BY30g3lG.js";import"./IconLoader2--3VUUmxB.js";function M({parsed:a}){const o=a.urls.map(t=>t.loc),r=a.sitemaps.map(t=>t.loc),i=[...o,...r],m=new Set(i),d=i.length-m.size,l=[...a.urls,...a.sitemaps].filter(t=>t.lastmod).length,u=i.filter(t=>t.startsWith("https://")).length,h=[{label:"Total sitemap entries",value:i.length,note:"All page URLs plus child sitemap URLs found in the file."},{label:"Page URLs",value:o.length,note:"Regular URL entries inside a urlset sitemap."},{label:"Child sitemaps",value:r.length,note:"Nested sitemap files inside a sitemap index."},{label:"Unique entries",value:m.size,note:"Entries after removing exact duplicate URLs."},{label:"Duplicate entries",value:d,note:"Exact repeated URLs that may need cleanup."},{label:"Entries with lastmod",value:l,note:"URLs or child sitemaps that include a lastmod value."},{label:"HTTPS entries",value:u,note:"Entries that use the https:// protocol."}];return e.jsxs(n,{className:"rounded-lg",children:[e.jsx(y,{children:e.jsxs(S,{className:"flex flex-wrap items-center gap-2",children:["Sitemap URL count report",e.jsx(j,{variant:"outline",className:"rounded-md",children:a.kind})]})}),e.jsx(w,{children:e.jsxs(N,{children:[e.jsx(v,{children:e.jsxs(f,{children:[e.jsx(x,{children:"Metric"}),e.jsx(x,{className:"text-right",children:"Count"}),e.jsx(x,{children:"What it means"})]})}),e.jsx(C,{children:h.map(t=>e.jsxs(f,{children:[e.jsx(g,{className:"font-medium",children:t.label}),e.jsx(g,{className:"text-right font-semibold",children:t.value.toLocaleString()}),e.jsx(g,{className:"max-w-md whitespace-normal text-muted-foreground",children:t.note})]},t.label))})]})})]})}const k=[{question:"How do I count URLs in a sitemap?",answer:"Paste the sitemap.xml URL and run the counter. The report shows page URL count, child sitemap count, total entries, unique entries, and duplicate entries."},{question:"What is a sitemap URL counter used for?",answer:"A sitemap URL counter helps you quickly understand sitemap size before an SEO audit, migration, indexation review, or Google Search Console submission."},{question:"Does this count URLs inside child sitemaps too?",answer:"This page counts the entries in the sitemap URL you provide. If the file is a sitemap index, it counts child sitemap URLs. Open each child sitemap to count page URLs inside that section."},{question:"Why do duplicate sitemap URLs matter?",answer:"Duplicate entries usually do not help search engines and can make sitemap audits messy. They are worth cleaning up when a CMS or plugin outputs repeated URLs."},{question:"Can a sitemap have too many URLs?",answer:"Yes. Google says a sitemap file must be 50MB or smaller uncompressed and can contain up to 50,000 URLs. Larger sites should split URLs across multiple sitemap files and use a sitemap index."},{question:"What is the sitemap 50,000 URL limit?",answer:"The sitemap protocol limit is 50,000 URLs per sitemap file. If a section has more URLs than that, create child sitemaps and list them in a sitemap index."},{question:"What is the sitemap 50MB limit?",answer:"Google documents a 50MB uncompressed size limit per sitemap file. Compressed .xml.gz files still need to stay within the uncompressed sitemap size limit."},{question:"Is this the same as validating a sitemap?",answer:"No. The counter focuses on URL counts and simple metrics. Use the Validate Sitemap page when you want status, XML parsing, and error-focused checks."}],B=[{title:"Total entries",body:"See the combined number of URL entries or child sitemap entries in the submitted file."},{title:"Unique URLs",body:"Compare unique URLs with total entries to spot repeated sitemap URLs."},{title:"Child sitemaps",body:"Identify sitemap index files that point to separate post, page, product, image, or language sitemaps."},{title:"Duplicate entries",body:"Find duplicate entries caused by CMS settings, plugin bugs, mi
1xed URL variants, or repeated exports."},{title:"lastmod coverage",body:"Check how many sitemap entries include lastmod values for freshness and update auditing."},{title:"HTTPS usage",body:"Confirm sitemap entries use secure URLs before you submit or compare the sitemap with crawl data."}];function J(){const[a,o]=c.useState(""),[r,i]=c.useState(),[m,d]=c.useState(!1),[l,u]=c.useState();async function h(){i(void 0),d(!0);try{const s=await b({data:{url:a}});u(s),s.errors.length&&!s.selected&&i(s.errors[0])}catch(s){i(s instanceof Error?s.message:"Count failed.")}finally{d(!1)}}const t=l?.selected?.parsed;return e.jsxs(L,{eyebrow:"Sitemap URL counter",title:"Sitemap URL counter",description:"Paste a sitemap.xml URL and count the URLs inside it. Sitemap Watch reports total entries, page URLs, child sitemaps, unique URLs, duplicate entries, lastmod coverage, and HTTPS usage.",related:[{title:"Sitemap Downloader",href:p.SitemapDownloader},{title:"Sitemap URL Extractor",href:p.SitemapExtractor},{title:"Validate Sitemap",href:p.ValidateSitemap}],children:[e.jsx(n,{className:"rounded-lg p-5 sm:p-6",children:e.jsx(E,{label:"Sitemap URL",placeholder:"https://example.com/sitemap.xml",value:a,submitLabel:"Count URLs",loading:m,error:r,onChange:o,onSubmit:h})}),l?e.jsxs("div",{className:"mt-6 space-y-6",children:[e.jsx(T,{result:l}),t?e.jsx(M,{parsed:t}):null,t?e.jsx(q,{parsed:t}):null]}):null,e.jsxs("section",{className:"mt-10 space-y-5",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"Count URLs in a sitemap before an audit"}),e.jsx("p",{className:"mt-3 max-w-3xl text-sm leading-6 text-muted-foreground",children:"Use this sitemap URL counter when you need a fast answer to how many URLs are in a sitemap. It is also useful for spotting empty sitemap files, duplicate entries, large sitemap sections, and sitemap indexes that need deeper review."})]}),e.jsx("div",{className:"grid gap-3 md:grid-cols-2 lg:grid-cols-3",children:B.map(s=>e.jsxs(n,{className:"rounded-lg p-5",children:[e.jsx("h3",{className:"font-semibold",children:s.title}),e.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:s.body})]},s.title))})]}),e.jsxs("section",{className:"mt-10 space-y-5",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"Sitemap URL limits: 50,000 URLs and 50MB"}),e.jsx("p",{className:"mt-3 max-w-3xl text-sm leading-6 text-muted-foreground",children:"Google's sitemap documentation says a single sitemap file must be no larger than 50MB uncompressed and can contain up to 50,000 URLs. If your sitemap is approaching either limit, split URLs into multiple child sitemaps and list them in a sitemap index."})]}),e.jsxs("div",{className:"grid gap-3 md:grid-cols-3",children:[e.jsxs(n,{className:"rounded-lg p-5",children:[e.jsx("h3",{className:"font-semibold",children:"Under 50,000 URLs"}),e.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:"Keep each child sitemap below the URL limit, then count each section after CMS or product catalog changes."})]}),e.jsxs(n,{className:"rounded-lg p-5",children:[e.jsx("h3",{className:"font-semibold",children:"Under 50MB uncompressed"}),e.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:"Compressed files are common, but the uncompressed sitemap still needs to fit within the documented size limit."})]}),e.jsxs(n,{className:"rounded-lg p-5",children:[e.jsx("h3",{className:"font-semibold",children:"Use a sitemap index"}),e.jsx("p",{className:"mt-2 text-sm leading-6 text-muted-foreground",children:"Large sites should use a sitemap index to organize child sitemaps by content type, language, date, or product category."})]})]})]}),e.jsx(R,{items:k}),e.jsxs("p",{className:"mt-6 text-sm text-muted-foreground",children:["Need the URL list after counting? Use the"," ",e.jsx(U,{to:p.SitemapDownloader,className:"text-primary underline",children:"sitemap downloader"}),"."]})]})}export{J as component};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.