首页 全栈极客与开发辅助内容详情

Sitemap Validator: XML Structure Checked, Errors With Line Numbers - Screen it before the search engine does

2026-11-17 3 访客
Sitemap Validator: XML Structure Checked, Errors With Line Numbers

站点名称:Sitemap Validator: XML Structure Checked, Errors With Line Numbers

所属分类:全栈极客与开发辅助

官方网址:https://www.9314.cn/tools/sitemap-check/en/

SEO查询: 爱站网 站长工具

进入网站

站点介绍

Sitemap Validator: XML Structure Checked, Errors With Line Numbers

Search Console kept saying "couldn't fetch" for three weeks once, logs told nothing, and the answer only surfaced from reading the sitemap line by line: a teammate had hand-added a URL with lastmod set to 2024-13-45. Shaped like a date, semantically impossible. That is when this page got written - screen it yourself before the search engine does.

The short version

  • Structure checks: root must be urlset (sitemapindex accepted), the 0.9 namespace, and a required loc holding an absolute URL in every entry - the protocol floor, item by item.
  • Field value ranges: lastmod against W3C formats (2024-02-30, well-formed but impossible, gets caught too), changefreq restricted to the seven legal values, priority within 0.0-1.0.
  • Errors at line:column: count along and fix - no being dismissed with a bare "validation failed".
  • Dedup and stats: duplicate locs listed one by one (with the line of first appearance), URL totals and domain distribution in one card - multiple domains in one sitemap is usually a config accident.
  • A hand-written XML parser finishes 1MB in milliseconds; no network, no uploads - safe even for staging sitemaps.

Why pasting is the main path

The browser's same-origin policy makes cross-origin fetches likely to fail (most sites send no CORS headers), so this page is designed around view-source, select-all, copy, paste. Fetch-by-URL works only same-site or where CORS is open, and failures report honestly - the page never pretends a sitemap passed.

Some honesty about lastmod

Since 2019 Google honors lastmod only when it matches the page's real modification time, and ignores it wholesale once bulk-faking is detected. Auto-refreshing every lastmod to today's date daily is self-deception - skipping the field beats faking it. My take: lastmod is better absent than fake; only genuine CMS timestamps carry value.

FAQ

Which rules does the validation cover?

Structure: the root must be urlset (sitemapindex is accepted too), the 0.9 namespace is checked, every url requires a non-empty loc with a valid absolute URL. Fields: lastmod against W3C formats (YYYY-MM-DD is the common one), changefreq restricted to always/hourly/daily/weekly/monthly/yearly/never, priority between 0.0 and 1.0. Plus duplicate-loc dedup, URL totals and domain distribution.

Can I just paste a live sitemap URL and fetch it?

Yes, with a caveat: browser same-origin policy means only same-site sitemaps or public ones served with open CORS can be fetched. Most sites do not send CORS headers, so the main path is view-source, copy, paste - nothing less. Failed fetches report honestly; the page never pretends a sitemap passed.

What happens if lastmod says 2024-13-45?

An error, located by line number. Month 13, day 45 is not a real date; 2024-02-30 (no February 30) fails the same way. Well-formed but impossible dates are the classic hand-written sitemap trap - search engines ignore the whole lastmod field over it.

Is my sitemap uploaded anywhere?

No. Validation runs entirely in this device's browser; pasted content is never stored or uploaded. Fetch by URL fires only when you type an address and click, and what it fetches stays in memory. Clear my data in the footer removes local interface options.

中文版:https://www.9314.cn/tools/sitemap-check/

 暂无评论,快来抢沙发吧~

发布评论