Search & metadata

What is an XML sitemap?

An XML sitemap is a structured file listing website URLs for search engines, with optional information such as meaningful update dates, to help them discover the pages the site wants considered for indexing.

By Plainview WebReviewed

The meaning

The sitemap sits alongside the website as a machine-readable inventory. Its core entries identify page addresses. XML provides the tags and structure used to express those entries consistently; a sitemap is not the same as a visible navigation menu or an article linking to other pages.

Many website platforms create sitemaps automatically. A site owner still needs to consider what belongs in the inventory: the preferred addresses of useful pages intended for search. When content is added, moved, or removed, the sitemap should continue to reflect that set rather than collect every URL the system can produce.

An example

Example: two pages on a fictional publication

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url><loc>https://example.com/</loc></url>
  <url><loc>https://example.com/guides/book-care</loc></url>
</urlset>

This fictional sitemap lists a homepage and one guide using complete addresses. Each loc element identifies the URL of a page. The example omits optional fields because a useful inventory does not require invented extra detail.

If lastmod is included, it should describe a real significant update to the page. Regenerating the file or changing a copyright year does not justify presenting every page as newly revised.

When it matters

A sitemap gives search engines an additional route to discovering content, which can be useful for a large archive or a new website. It should accompany clear internal links so visitors can also find the pages. Discovery through a file and navigation through a website serve different audiences.

Plainview's builder can prepare an inventory from supplied URLs, and its inspector can examine a supplied sitemap for issues such as duplicates or malformed entries. The file still needs to be published and maintained. A successful file check does not prove that the listed pages load, are indexable, or have been indexed.

A common confusion

Listing a page does not guarantee indexing

A sitemap is a discovery aid, not an instruction that forces search engines to include every address. Google explicitly leaves crawling and indexing decisions to its systems. Adding a missing page is useful housekeeping, but it does not establish a ranking or replace investigation of the page itself.

Use it in practice

Sources & further reading