These are original, fictional excerpts. No supplied address is fetched and no file is read from your computer. Each question isolates one issue; snippets are not complete sitemap files. Choices remain in page memory.

1. The domain left behind

Displayed code only: this snippet is not executed.

Read the code and explanation without the quiz
XML · EXAMPLE
<!-- An excerpt from a normal single-site sitemap for example.com -->
<url><loc>https://example.com/notes/</loc></url>
<url><loc>https://another.example/about/</loc></url>

The intended about page is https://example.com/about/. What should you repair?

Correct. This ordinary single-site list contains the wrong host. Verify the intended page and replace the whole address; do not assume that a matching path exists.

Take it further

Compare the scheme, host, path and any query of each loc entry with your intended address. Advanced cross-site submission arrangements are outside this single-site exercise.

Explore the related explanation or recipe

2. Two entries, one destination

Displayed code only: this snippet is not executed.

Read the code and explanation without the quiz
XML · EXAMPLE
<url><loc>https://example.com/notes/</loc></url>
<url><loc>https://example.com/notes/</loc></url>

What does the second identical entry add?

Correct. Keep one entry for this address. Duplicate entries are redundant, even if the XML still parses.

Take it further

Distinguish an exact duplicate from different addresses that redirect to the same preferred page. Choose the intended canonical version instead of listing aliases.

Explore the related explanation or recipe

3. An ampersand XML cannot read

Displayed code only: this snippet is not executed.

Read the code and explanation without the quiz
XML · EXAMPLE
<!-- Assume this query URL is intentionally public and canonical -->
<url><loc>https://example.com/walks/?season=autumn&route=canal</loc></url>

How should that ampersand be represented inside the XML?

Correct. XML needs &amp; here. A parser reads it back as the ampersand in the actual URL.

Take it further

Explain the difference between XML escaping and URL percent-encoding. Replacing the separator with %26 would change how the query is interpreted.

Explore the related explanation or recipe

Put the repaired entries together

For this fictional site, assume each address below is public, canonical and intended for inclusion. The duplicate is removed, the about-page host is repaired and the query separator is XML-escaped.

XML · EXAMPLE
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url><loc>https://example.com/notes/</loc></url>
  <url><loc>https://example.com/about/</loc></url>
  <url><loc>https://example.com/walks/?season=autumn&amp;route=canal</loc></url>
</urlset>

Parsing is only the first check

Well-formed XML can still list the wrong pages. After syntax, review the addresses, intended indexability and coverage. A sitemap neither grants access to private content nor guarantees indexing.

Create your first sitemap · Use the generator thoughtfully · Publishing learning path.