# XML

> XML (Extensible Markup Language) is a structured text format used in SEO to create sitemaps that list a site's URLs for search engines to crawl and index.

Search engine optimisation · Updated 2026-08-29 · [Marketing glossary](https://www.getlooploop.com/glossary)

**In short** XML is a way to write down a list of your website's URLs so search engines can find them easily.

## What it is and how it works

XML, short for Extensible Markup Language, is a generic format that defines rules for structuring data with tags. In SEO, XML is used almost exclusively for sitemaps: a file that lists the URLs you want search engines to crawl. The file typically contains a set of `` entries, each with a `` tag for the URL and optional tags like `` for the last modification date, `` for how often the page changes, and `` for relative importance. You place the file at a predictable address, such as `https://example.com/sitemap.xml`, and tell search engines about it. When a crawler fetches the file, it parses the XML, reads the URLs, and adds them to its crawl queue. The format is strict: every tag must be closed and the file must be well-formed, otherwise the crawler may ignore it.

## What to do about it

To get value from XML, create a sitemap and keep it current. Use a plugin or generator to produce the file automatically, or hand-code it if your site is small. Include only canonical URLs, skip tracking parameters and session IDs. Keep the file under 50 MB and under 50,000 URLs; if you exceed that, split it into multiple files and use a sitemap index. Submit the sitemap in Google Search Console under the 'Sitemaps' section. Also add a `Sitemap:` line to your `robots.txt` file, like `Sitemap: https://example.com/sitemap.xml`. After submission, monitor the report for errors and update the sitemap whenever you add or remove significant pages.

## How it is measured or noticed

You can measure an XML sitemap's effectiveness in a few ways. In Google Search Console, the 'Sitemaps' report shows the submission date, status, and the number of discovered URLs. The 'Indexing' report then shows how many of those URLs are actually indexed. A large gap between submitted and indexed may indicate content issues or duplicate pages. You can also check server logs for requests to the sitemap file from crawlers; a recent fetch means the crawler is reading it. A healthy sitemap shows a high discovery rate and few errors.

## Common mistakes

Avoid these common mistakes when working with XML sitemaps:

- Including URLs that return 404 or redirect to a different page.
- Listing duplicate or near-duplicate URLs, such as session IDs or tracking parameters.
- Using `lastmod` incorrectly or failing to update it when a page changes.
- Placing the sitemap in a directory blocked by `robots.txt`.
- Submitting a sitemap that exceeds the 50 MB or 50,000 URL limit.
- Writing malformed XML, like unclosed tags or invalid characters.

## Limits and confusions

XML sitemaps are a discovery aid, not a ranking factor. They tell search engines which URLs exist, but they don't guarantee indexing or ranking. They are often confused with HTML sitemaps, which are user-facing pages of links, or with RSS feeds, which are for content syndication. XML sitemaps also do not solve duplicate content issues; you still need canonical tags and proper redirects. If your site is small and well-linked, you may not need an XML sitemap at all. For large sites, they are essential but require regular maintenance to stay useful.

## A worked example

Here is a minimal XML sitemap for a two-page site:

> <?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url> <loc>https://example.com/</loc> <lastmod>2025-01-01</lastmod> <changefreq>monthly</changefreq> <priority>1.0</priority> </url> <url> <loc>https://example.com/about</loc> <lastmod>2025-01-01</lastmod> <changefreq>monthly</changefreq> <priority>0.8</priority> </url> </urlset>

## Sitemap index for large sites

If your site has more than 50,000 URLs, create multiple sitemap files and reference them in a sitemap index file. This keeps each file under the limit and makes updates easier.

## Frequently asked questions

### What's the difference between an XML sitemap and an HTML sitemap?

An XML sitemap is a machine-readable file that lists URLs for search engines to crawl, while an HTML sitemap is a human-readable page that helps visitors navigate. XML sitemaps are the primary tool for SEO, as they directly communicate your site's structure to crawlers. HTML sitemaps are less critical and mainly for user experience.

### Should I create an XML sitemap for my site?

Yes, you should create an XML sitemap if your site has more than a few pages, especially if it's new, has few external links, or uses rich media. It's also important for large sites or those with isolated pages that are hard to discover. Most SEOs recommend it as a standard practice.

### How do I create and submit an XML sitemap?

You can generate an XML sitemap using a CMS plugin, a sitemap generator tool, or write it manually. Once created, upload it to your site's root directory and submit it via Google Search Console and Bing Webmaster Tools. Keep it updated whenever you add or remove pages.

### Does an XML sitemap still matter for SEO?

Yes, XML sitemaps still matter for discovery, though they are not a ranking factor. They help search engines find and crawl your pages more efficiently, especially if you have a large site or new content. They're particularly useful for sites with weak internal linking.

### What happens if I don't update my XML sitemap?

If you don't update your XML sitemap, search engines may still crawl your site but might miss new pages or waste time on removed ones. This can slow down indexing of new content and cause 404s for deleted URLs. Regularly updating it ensures your site's visibility stays accurate.

### How long does it take for an XML sitemap to affect indexing?

It can take anywhere from a few days to several weeks for search engines to process a new or updated XML sitemap. The effect depends on your site's crawl budget, authority, and how often you submit it. You can check the sitemap status in Search Console to track progress.

## Asked out loud

The same term in the words somebody uses speaking to an assistant rather than typing into a box — written from the situation, which is why each one carries the situation it came from.

### I need to get my new site noticed by Google, what do I do?

Yes, you should create an XML sitemap and submit it to Google Search Console. That's the fastest way to tell Google your pages exist. Make sure the sitemap is current and includes all your important URLs.

### My client's pages aren't showing up in search, what am I missing?

Check if your XML sitemap is valid and up to date, and that it's submitted in Search Console. Often the issue is a stale sitemap or a robots.txt file blocking crawlers. Fix those and request indexing for the affected pages.

### I just published a new post on my phone, how do I get it indexed quickly?

Update your XML sitemap to include the new URL, then use the URL Inspection tool in Search Console to request indexing. That's the most direct way. It usually gets picked up within a few days.

## Sources

- [Google Search Central: Build and submit a sitemap](https://developers.google.com/search/docs/crawling-indexing/sitemaps/build-sitemap)

Source: GetLoopLoop Glossary — https://www.getlooploop.com/glossary/xml. CC BY 4.0: https://creativecommons.org/licenses/by/4.0/

---

Canonical page: https://www.getlooploop.com/glossary/xml
This is the Markdown copy of that page for AI agents, made from the same content.

Other languages: [uk](https://www.getlooploop.com/uk/glossary/xml.md) · [es](https://www.getlooploop.com/es/glossary/xml.md)
