The Sitemap SOP
The Sitemap SOP
@SitemapSOP

Escape these five characters or fail validation

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

Must be entity-escaped inside <loc>:
— & → &
— ' → '
— " → "
— > → >
— < → <

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

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

Definition of done: the file parses as well-formed XML with zero entity errors.
This post was published in the Telegram channel The Sitemap SOP (@SitemapSOP). All its posts are on the channel page.
Open on Telegram

Latest posts in “Tools and infrastructure”

All channels in this category →

реклама в сети

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

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

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