Hướng dẫn về Ecommerce XML Sitemaps

Generic sitemap advice breaks xuống tại catalog scale. Này là cách segment an ecommerce sitemap by loại, stay dưới đó 50 000-URL/50MB limits với một sitemap chỉ mục, decide điều gì happens để out-of-stock và discontinued sản phẩm URLs, giữ lastmod honest as inventory turns over daily, và pair sitemaps với IndexNow — plus vì sao splitting by category là cho monitoring, khôngân sách crawl.

Xuất bản lần đầu: 3 thg 7, 2026 · Cập nhật lần cuối: 8 thg 8, 2026 · Advanced
Ngôn ngữ
1 tín hiệu bằng chứng trên trang này

An ecommerce XML sitemap lists đó canonical URLs một store wants được crawl, split by nội dung loại (các sản phẩm, categories, brands, static các trang) dưới một sitemap chỉ mục. Đó hard limits bạn design khoảng: 50 000 URLs / 50MB theo file, lên để 50 000 files theo chỉ mục. Segmentation là cho monitoring trong Search Console và Bing Quản trị viên web Tools — không một crawl-budget hoặc xếp hạng lever (Mueller). Chỉ bao gồm canonical, indexable, 200-status URLs; giữ lastmod honest để đó cuối cùng significant thay đổi và bỏ qua priority/changefreq (Google bỏ qua cả hai). Đó differentiator hầu hết các hướng dẫn skip là out-of-stock và discontinued các sản phẩm: xử lý them với một được ghi lại cây quyết định (vĩnh viễn so với. tạm thời so với. unknown) và sync sitemap removal với internal-link cleanup, không blanket 404s. Automate generation so đó file không bao giờ goes stale, và pair lastmod với IndexNow cho fast price/stock thay đổi.

Tóm tắt — Segment ecommerce sitemap by loại (các sản phẩm / categories / brands / static) dưới một sitemap chỉ mục, và know Vì sao: nó monitoring tool cho Search Console và Bing Quản trị viên web Tools, không crawl-budget hoặc xếp hạng lever (Mueller). limits bạn design khoảng: 50 000 các URL / 50MB theo file, lên để 50 000 files theo chỉ mục, và — cho enterprise ceiling — GSC accepts lên để 500 sitemaps và Bing trạng thái của nó chỉ mục model scales để billions của các URL. chỉ bao gồm canonical, indexable, 200-status các URL; exclude facets, theo dõi params, thin variants, các chuyển hướng, 4xx, và noindex. lastmodchỉ thuộc tính cả hai engines sử dụng — giữ nó honest để cuối cùng significant thay đổi; bỏ qua prioritychangefreq (Google explicitly bỏ qua cả hai). Automate generation so file không bao giờ goes stale, và pair lastmod với IndexNow cho fast price/stock thay đổi. differentiator phần lớn các hướng dẫn skip: out-của-stock và discontinued các sản phẩm cần được ghi lại cây quyết định (vĩnh viễn so với. tạm thời so với. unknown), với sitemap removal synced để internal-link cleanup — không blanket 404s.

Vì sao generic sitemap advice breaks tại catalog scale

Mỗi “how to make a sitemap” (bản dịch) «cách làmột sitemap» bài viết covers đó giống nhau điều: đó 50 000-URL limit, splitting vào an chỉ mục, excluding junk URLs, giữ lastmod chính xác. đó là all đúng, và none of điều này là nơi an ecommerce store thực ra struggles. Đó store-scale các vấn đề là operational: một catalog đó turns over daily, out-of-stock và discontinued SKUs by đó thousand, near-duplicate size/color variants, và automation đó âm thầm dừng đang chạy. Này piece assumes bạn đã có một sitemap và cần để xử lý những.

Đó reason sitemaps earn của họ giữ hơn as một store grows là straightforward. Google: “Generally, on large sites it’s more difficult to make sure that every page is linked by at least one other page on the site.” (bản dịch) «Generally, trên các trang web lớn đây là hơn difficult để hãy bảo đảm đó mỗi trang là linked by ít nhất một other trang on đó site.» MỘT sitemap là cách bạn hãy bảo đảmột sản phẩm đó là dưới-linked internally vẫn nhận discovered. John Mueller có called XML sitemaps “a minimal baseline for any serious website.” (bản dịch) «một minimal baseline cho bất kỳ serious website.» Đó Mueller “minimal baseline” (bản dịch) «minimal baseline» line là relayed qua Công cụ tìm kiếm Roundtable coverage of an X/Twitter reply; treat điều này as reported, không một self-fetched chính quote.

hard limits bạn’re designing khoảng

sitemap giao thức caps single file và cho bạn sitemap chỉ mục để nhận past nó:

  • Theo file: Google — “All formats limit a single sitemap to 50MB (uncompressed) or 50,000 URLs. If you have a larger file or more URLs, you must break your sitemap into multiple sitemaps.” (bản dịch) «All formats limit một single sitemap để 50MB (uncompressed) hoặc 50 000 URLs. Nếu bạn có một lớn hơn file hoặc hơn URLs, bạn phải break của bạn sitemap vào multiple sitemaps.» Evidence for this claim Each Google sitemap file is limited to 50,000 URLs or 50 MB uncompressed. Scope: Protocol and Search Console submission limits are separate constraints. Confidence: high · Verified: Google: Large sitemaps
  • Sitemap chỉ mục: “A sitemap index file may have up to 50,000 loc tags” (bản dịch) «MỘT sitemap chỉ mục file có thể có lên để 50 000 loc tags» — i.e. điều này có thể reference lên để 50 000 child sitemaps. Bạn có thể “submit up to 500 sitemap index files for each site in your Search Console account.” (bản dịch) «submit lên để 500 sitemap chỉ mục files cho mỗi site trong của bạn Search Console account.»
  • Bing stated ceiling là hơn generous vẫn: lên để 50 000 URLs theo file và 50 000 child files theo chỉ mục, so “a single sitemap index file can reference up to 2.5 billion URLs. At scale, multiple index files can support up to 2.5 trillion URLs across a domain, making this approach ideal for large, complex sites.” (bản dịch) «một single sitemap chỉ mục file có thể reference lên để 2,5 billion URLs. Tại scale, multiple chỉ mục files có thể hỗ trợ lên để 2,5 trillion URLs across một domain, đang làm này approach ideal cho lớn, phức tạp các trang.»

cho nearly mỗi store, practical takeaway là: 50 000 các URL theo file, split by loại, một chỉ mục. billions/trillions figures chỉ quan trọng nếu bạn’re architecting cho tens của millions của SKUs — nhưng họ tell bạn giao thức sẽ không là của bạn bottleneck.

Segmentation strategy — và Điều gì nó thực ra cho

Split catalog vào logical sitemap files — các sản phẩm, categories/collections, brands, static/CMS các trang — referenced by single chỉ mục. Ở đây part phần lớn các hướng dẫn nhận sai: họ imply đó splitting sitemap by loại improves ngân sách crawl hoặc nhận nhiều hơn các trang được lập chỉ mục. nó không. Mueller là rõ ràng đó Đây là diagnostic lựa chọn, không crawl lever:

  • “The size & number of sitemap files generally won’t affect the crawling, unless your server is so bogged down that even fetching a handful of sitemap files would slow it down…” (bản dịch) «Đó size & number of sitemap files generally sẽ không ảnh hưởng đó crawling, trừ khi máy chủ của bạn là so bogged xuống đó even fetching một handful of sitemap files sẽ chậm điều này xuống…»
  • “I generally recommend splitting a sitemap file into logical parts of your site so that you can monitor those parts individually…” (bản dịch) «I generally khuyến nghị splitting một sitemap file vào logical parts of trang web của bạn so đó bạn có thể monitor những parts individually…» Cả hai relayed qua Search Engine Journal’s báo cáo of một Reddit AMA; đó split-cho- monitoring point là đó operative một.

So đó payoff of một các sản phẩm sitemap tách biệtừ một categories sitemap là đó GSC Sitemaps báo cáo và Bing Quản trị viên web Tools cho thấy bạn một được gửi-so với-được lập chỉ mục ratio theo segment. Khi “product pages” (bản dịch) «sản phẩm các trang» cho thấy 40% được lập chỉ mục nhưng “category pages” (bản dịch) «category các trang» cho thấy 95%, bạn know chính xác nơi để look. Segmentation surfaces đó vấn đề; điều này không cách sửa điều này, và điều này không buy bạn ngân sách crawl.

Điều gì belongs trong sitemap — và Điều gì không

Google rule là đó toàn bộ filter: “Include the URLs in your sitemap that you want to see in Google’s search results. Google generally shows the canonical URLs in its search results, which you can influence with sitemaps.” (bản dịch) «Bao gồm đó URLs trong của bạn sitemap đó bạn muốn để see trong Google kết quả tìm kiếm. Google generally cho thấy đó canonical URLs trong của nó kết quả tìm kiếm, mà bạn có thể influence với sitemaps.» So một sitemap URL nên là canonical, indexable, và trả về một 200. Evidence for this claim Google recommends listing the canonical URLs that a site wants shown in Search. Scope: Sitemap inclusion is a canonicalization hint and does not override noindex or response status. Confidence: high · Verified: Google: Build and submit a sitemap

bao gồm: canonical sản phẩm các trang (PDPs), category/collection các trang bạn muốn được xếp hạng, brand các trang, indexable static các trang.

Exclude:

  • Faceted / filtered / sorted URLs?sort=, ?color=, filter combinations. Những belong trong của bạn facet strategy (block hoặc canonical), không đó sitemap. Joshua Hardwick Ahrefs sitemap hướng dẫn flags đó ecommerce-cụ thể version of này: đây là “worth checking for duplicate and near-duplicate pages on ecommerce sites as these often slip through the net.” (bản dịch) «worth kiểm tra cho duplicate và near-duplicate các trang on ecommerce các trang as những thường slip qua đó net.»
  • Session IDs và tracking parameters.
  • Các chuyển hướng (3xx)các lỗi (4xx / 410) — một sitemap of chuyển hướng URLs là một sitemap of URLs bạn là telling Google không để cho thấy.
  • noindex các trang — contradicting yourself (submit + noindex) chỉ wastes crawl.
  • Thin near-duplicate variants. MỘTách biệt size/color URL với không unique nội dung không nên là mộtách biệt sitemap entry — list đó canonical sản phẩm URL. Google 2024 sản phẩm-variants dữ liệu có cấu trúc (ProductGroup / hasVariant / variesBy) là đó modern way để express đó một set of size/color options là một sản phẩm với variants thay vì N near-duplicate các trang; let đó, không đó sitemap, carry đó variant mối quan hệ.

Sản phẩm images ride on đó owning trang entry, không mộtách biệt list. không xây dựng một standalone sitemap of image URLs — thêm an <image:image> block để đó canonical sản phẩm URL’s own <url> entry dùng đó image sitemap extension. Google: “Each <url> tag can contain up to 1,000 <image:image> tags” (bản dịch) «Mỗi <url> tag có thể contain lên để 1 000 <image:image> tags» — plenty cho một PDP gallery. Evidence for this claim Product images can be added to an existing product URL entry with the image sitemap extension instead of a separate image sitemap. Scope: Each <url> entry can carry up to 1,000 <image:image> tags, and the images still have to be crawlable (not blocked by robots.txt) and, if served from another domain, verified in Search Console. Confidence: high · Verified: Google: Image sitemaps Hai crawlability requirements đó là easy để miss tại catalog scale: không disallow đó image paths trong robots.txt, và nếu sản phẩm images là phân phối từ mộtách biệt domain hoặc CDN, verify đó host trong Search Console hoặc đó images sẽ không là picked lên. Mà variant image nhận đó entry follows đó giống nhau canonical-architecture call as đó URL itself — attach images để đó canonical sản phẩm entry, không để mỗi thin variant URL bạn đã đã excluded trên.

out-của-stock và discontinued sản phẩm cây quyết định

Đây là nơi ecommerce sitemap bài viết có thể thực ra differentiate, vì gần như none của them xử lý nó với bất kỳ nuance — và nó chính xác decision đó determines liệu URL belongs trong sitemap. I’ve được viết đầy đủ framework on Ahrefs blog (Cách nên bạn Xử lý Out-của-Stock Các sản phẩm? nó Phụ thuộc), và có reason nó được gọi là “điều này phụ thuộc.” có không perfect giải pháp — job là để establish consistent rules aligned với của bạn business goals, không để memorize một câu trả lời.

decision splits on hai axes: là nó đã biến mất permanently hoặc temporarily, và làm trang vẫn có giá trị (traffic, reviews, hữu ích info)?

  • Temporarily out, confirmed returning → giữ trang trực tiếp và trong sitemap. Offer restock estimate, waitlist, notify-me. không churn nó trong và out của sitemap on mỗi stock toggle — đó noise.
  • Temporarily out, status unknown → deprioritize nó trong UI và liên kết nội bộ (reorder, filter nó xuống) thay vì pulling nó từ sitemap immediately. Premature removal risks Google treating trang as abandoned và losing thứ hạng đó là hard để win back.
  • Permanently đã biến mất, good replacement tồn tại → 301 chuyển hướng để similar sản phẩm để bảo toàn giá trị liên kết, và xóa nó từ sitemap.
  • Permanently đã biến mất, không replacement, nhưng trang vẫn earns traffic hoặcó hữu ích nội dung (reviews, buying hướng dẫn) → nó có thể stay trực tiếp và trong sitemap.
  • Permanently đã biến mất, không giá trị → delete và trả về 404/410, và xóa nó từ sitemap.

MỘT cốt yếu operational point: removal là một coordinated cleanup, không một single sitemap edit. As I put điều này trong đó bài viết, “when redirecting a page, many systems will automatically remove internal links from categories, facets, sitemaps, and internal search pages” (bản dịch) «khi chuyển hướng một trang, nhiều các hệ thống sẽ tự động xóa liên kết nội bộ từ categories, facets, sitemaps, và internal tìm kiếm các trang» — so pull đó URL từ đó sitemap sạch lên đó liên kết nội bộ đó point tại điều này (category modules, related-sản phẩm widgets, internal tìm kiếm) trong đó giống nhau workflow. MỘT dead URL đó là đã biến mấtừ đó sitemap nhưng vẫn linked từ twenty category các trang hasn’t thực sự đã cleaned lên.

và điều Google own hướng dẫn warns so với: không reflexively mass-404 mỗi discontinued sản phẩm. Google favors giữ URL trực tiếp với alternatives, hoặc chuyển hướng để relevant category, over blanket 404s — và nó warns so với generating lớn numbers của soft 404s. wall của newly-404’d sản phẩm các trang là chính xác pattern đó triggers đó.

Cập nhật frequency, lastmod, và automation

Automate generation. Này là non-negotiable on một catalog đó thay đổi daily. My standing advice on enterprise các trang là: “Add sitemaps. I would make sure this is automated. If you are asked to manually create them, you can do it, but just know that if it’s manual these will rarely be kept up-to-date.” (bản dịch) «Thêm sitemaps. I sẽ hãy bảo đảm này là automated. Nếu bạn là asked để manually tạo them, bạn có thể làm điều này, nhưng chỉ know đó nếu đây là manual những sẽ rarely là kept lên-để-date.» Bing có được ghi lại đó chính xác chế độ lỗi — “Too often, Bing discovers stalled sitemaps which have the same URLs listed for months – sometimes years” (bản dịch) «Cũng thường, Bing discovers stalled sitemaps mà có đó giống nhau URLs listed cho months – sometimes năm» — và khuyến nghị đó sitemap “should ideally be automatically generated at least once a day.” (bản dịch) «nên ideally là tự động generated ít nhất khi một day.»

lastmod là một thuộc tính đó matters. Cả hai Google và Bing actively sử dụng nó; không ai dùng others. giữ nó honest:

  • Google: “Google uses the <lastmod> value if it’s consistently and verifiably (for example by comparing to the last modification of the page) accurate.” (bản dịch) «Google dùng đó <lastmod> giá trị nếu đây là consistently và verifiably (ví dụ by comparing để đó cuối cùng modification of đó trang) chính xác.» Và điều này nên “reflect the date and time of the last significant update to the page… an update to the main content, the structured data, or links on the page is generally considered significant, however an update to the copyright date is not.” (bản dịch) «reflect đó date và time of đó cuối cùng significant cập nhật để đó trang… an cập nhật để đó main nội dung, đó dữ liệu có cấu trúc, hoặc links on đó trang là generally considered significant, tuy nhiên an cập nhật để đó copyright date không phải.»
  • Bing là blunt về đó anti-pattern: “Do not set the <lastmod> value set to the time you generate the sitemap. <lastmod> should be the date of the last modification of the content.” (bản dịch) «Không set đó <lastmod> giá trị set để đó time bạn generate đó sitemap. <lastmod> nên là đó date of đó cuối cùng modification of đó nội dung.» Dùng ISO 8601 với một time component.

Ở đây genuine gray area worth flagging: là price thay đổi hoặc stock-status flip “significant” cập nhật? By Google definition (main nội dung / dữ liệu có cấu trúc / links), bare price thay đổi là arguably không — nhưng nếu nó thay đổi của bạn Product dữ liệu có cấu trúc (availability, price), đó closer để significant. My honest đọc: không try để là clever về nó. không bump lastmod on mỗi trivial toggle (đó chỉ adds noise), và không rely on lastmod alone để propagate nhạy cảm với thời gian price drop fast.

Pair lastmod với IndexNow cho fast-moving thay đổi. Bing frames đó hai as complementary, không either/hoặc: “While real-time URL submission protocols such as IndexNow help notify search engines of immediate content changes, sitemaps remain a foundational signal for ensuring comprehensive URL coverage across your site.” (bản dịch) «Trong khi real-time URL submission các giao thức such as IndexNow help notify cácông cụ tìm kiếm of immediate nội dung thay đổi, sitemaps vẫn một foundational tín hiệu cho bảo đảm comprehensive URL coverage across trang web của bạn.» Và cho AI-powered surfaces cụ thể: “The lastmod field in your sitemap remains a key signal, helping Bing prioritize URLs for recrawling and reindexing, or skip them entirely if the content hasn’t changed since the last crawl.” (bản dịch) «Đó lastmod trường trong của bạn sitemap vẫn một key tín hiệu, helping Bing prioritize URLs cho recrawling và reindexing, hoặc skip them hoàn toànếu đó nội dung hasn’t changed since đó cuối cùng crawl.» So: sitemap cho coverage và daily freshness, IndexNow (Bing/Yandex/others — không Google) để push individual price/stock flips không có đang chờ cho đó tiếp theo recrawl cycle.

Bỏ qua prioritychangefreq

không spend engineering time maintaining những. Google là unambiguous: “Google ignores <priority> and <changefreq> values.” (bản dịch) «Google bỏ qua <priority><changefreq> các giá trị.» Gary Illyes reportedly called đó priority trường “essentially a bag of noise.” (bản dịch) «essentially một bag of noise.» Đó Illyes line là relayed qua Công cụ tìm kiếm Roundtable SMX Advanced 2017 coverage, không một self-fetched chính nguồn; đó point stands regardless vì Google tài liệu hiện tại say cả hai các trường là đã bỏ qua. Whatever giá trị của bạnền tảng auto-populates cho những là harmless; chỉ không xây dựng logic để compute them.

Monitoring và diagnosis

Đây là Điều gì segmentation là cho:

  • GSC Sitemaps báo cáo — theo-segment được gửi-so với-được lập chỉ mục. sản phẩm-sitemap ratio đó nhiều tệ hơn của bạn category sitemap points bạn straight tại sản phẩm-trang vấn đề (thin nội dung, blocked variants, canonical các vấn đề).
  • Bing Quản trị viên web Tools — giống nhau segment-level view on Bing side, plus IndexNow submission status.
  • GSC trang lập chỉ mục báo cáo — watch excluded buckets cho facet/parameter các URL ballooning, mà có nghĩ là của bạn facet strategy là leaking vào phát hiện.
  • trang web crawl / audit (Ahrefs trang web Audit, Screaming Frog) — catch các sản phẩm vẫn cho thấy out-của-stock message, orphaned các sản phẩm không lâu hơn linked từ anywhere, và hỏng liên kết nội bộ left behind sau khi chuyển hướng hoặc removal.

Enterprise-scale architecture — worked shape

cho catalog trong millions của SKUs, plan hierarchy khoảng của bạn thực tế volume và submission ceilings thay vì bolting on files reactively:

/sitemap-index.xml            ← the one index you submit to GSC + BWT
  ├── /sitemaps/products-1.xml      (URLs 1–50,000)
  ├── /sitemaps/products-2.xml      (50,001–100,000)
  ├── … products-N.xml              (chunk every 50,000 canonical PDPs)
  ├── /sitemaps/categories.xml      (all category / collection pages)
  ├── /sitemaps/brands.xml          (all brand pages)
  └── /sitemaps/static.xml          (homepage, guides, policy pages)

Tại 5M các sản phẩm đó ~100 sản phẩm sitemap files plus handful của others — well trong 50 000-files-theo-chỉ mục limit và GSC 500-sitemap acceptance. nếu bạn somehow exceed single chỉ mục (50 000 × 50 000 = 2,5B các URL), bạn split vào multiple chỉ mục files và submit mỗi. point là để size chunks lên front so daily regeneration chỉ rewrites mỗi file nội dung, và bạn không bao giờ có để re-architect tree vì bạn outgrew guess.

nơi điều này sits

Ecommerce sitemaps overlap heavily với các trang họ list. Điều gì belongs trong sitemap là decided by của bạn category-trang và faceted-navigation strategy (mà filtered các URL là canonical và indexable). Điều gì happens để URL Khi sản phẩm sells out là out-của-stock và discontinued-sản phẩm decision. và sitemap là một của several ways các crawler discover store — alongside liên kết nội bộ, IndexNow, và (cho Google Shopping) Merchant Center sản phẩm feed. sitemap không replace bất kỳ của những điều đó; nó coverage backstop đó làm sure không có gì nhận stranded.

Add an expert note

Pin an expert quote

New person? Create their unclaimed profile at /admin/experts/ → Pin a quote first.