The Sitemap SOP
The Sitemap SOP
@SitemapSOP

<b>SOP: Validate XML before you ever submit</b>

<b>SOP: Validate XML before you ever submit</b>

Google parses strictly. One unescaped ampersand and parsing stops at that line. Pre-flight:

— ✅ File is well-formed XML — <code>xmllint --noout sitemap.xml</code> exits 0
— ✅ Ampersands in URLs escaped as <code>&amp;amp;</code>, not raw <code>&</code>
— ✅ Single quotes/angle brackets escaped (<code>&amp;apos;</code>, <code>&amp;lt;</code>)
— ✅ UTF-8 encoded, no BOM (a leading BOM breaks the XML declaration)
— ✅ Correct namespace: <code>xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"</code>

The BOM bug is invisible in most editors — the file looks perfect, Google reports "not valid XML" at line 1.

Command: <code>file sitemap.xml</code> — must NOT say "with BOM".

Definition of done: xmllint passes and <code>file</code> reports plain UTF-8.
Этот пост опубликован в Telegram-канале The Sitemap SOP. Подписаться можно по ссылке: @SitemapSOP.
tech

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

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

start

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

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

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