Practice · Technical

Find the invalid sitemap entry

Technical Medium at worst 12 of 30

Try it yourself

A sitemap is the list of pages you are asking search engines to look at. This one has an error that makes a crawler skip an entry.

Which line is wrong?

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. </urlset>

Pick a line. Every one of them has an answer.

Show me the answer

<url><loc>/contact</loc></url>

This is the one. Sitemap entries must be complete absolute URLs — protocol, domain and path. A relative path has no meaning in a file that could be fetched from anywhere, so this entry is discarded and /contact never gets submitted.

The written version

An XML sitemap is the list of pages you want found →

How to check your own site for this, what to change, and how to confirm it worked.

Now the real thing

Run this check on your own site.

The same check, plus twenty-nine others, against your actual pages. Free, no account, about a minute.

Free · No account · Results in under a minute · Public websites only