The Sitemap SOP
The Sitemap SOP
@SitemapSOP

Mistake: unencoded ampersands and entities in loc

Mistake: unencoded ampersands and entities in loc

URLs with query strings break the XML when &, <, >, or quotes go in raw. One unescaped character makes the parser reject everything after it — you lose the tail of the file, not just one URL.

Fix checklist:
— ✅ & → &, < → <, > → > in every <loc>
— ✅ Non-ASCII paths are percent-encoded (UTF-8) before XML-escaping
— Run output through a real XML serializer; never concatenate strings by hand
— ✅ File is valid UTF-8 with no BOM

Definition of done: pipe the raw file through xmllint --noout sitemap.xml. Exit code 0 is the only pass. A sitemap that renders fine in a browser can still fail strict parsing.
Этот пост опубликован в Telegram-канале The Sitemap SOP. Подписаться можно по ссылке: @SitemapSOP.
tech

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

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

start

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

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

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