The Sitemap SOP
The Sitemap SOP
@SitemapSOP

<b>Escape these five characters or fail validation</b>

<b>Escape these five characters or fail validation</b>

Raw ampersands and angle brackets in URLs break XML parsing. The entry, sometimes the whole file, is rejected.

Must be entity-escaped inside <code>&lt;loc&gt;</code>:
— <code>&amp;</code> → <code>&amp;amp;</code>
— <code>'</code> → <code>&amp;apos;</code>
— <code>"</code> → <code>&amp;quot;</code>
— <code>&gt;</code> → <code>&amp;gt;</code>
— <code>&lt;</code> → <code>&amp;lt;</code>

Also required:
— ✅ URLs percent-encode non-ASCII (use the IDN/punycode or %-form).
— ✅ Absolute URLs only, including scheme and host.
— ✅ The <code>&lt;loc&gt;</code> ≤ 2,048 characters.

Checklist:
Step 1 — Run the file through an XML validator, not just a sitemap linter.
Step 2 — Grep for raw <code>&amp;</code> in loc values — common in URLs with query strings.

Definition of done: the file parses as well-formed XML with zero entity errors.
Этот пост опубликован в Telegram-канале The Sitemap SOP. Подписаться можно по ссылке: @SitemapSOP.
tech

Свежие посты в категории «Tech Infrastructure»

Все каналы категории →

start

Готовы запустить рекламу через сеть public.tg?

Новый оффер, продукт, GEO, кейс, событие или партнёрский запуск — соберём маршрут под задачу и отдадим медиаплан.

Telegram для медиаплана: @dumay. Быстрый тест: $20 за канал, $1000 за пакет по сети.