freecourses.digital

Technical · Technical SEO

XML Sitemap

XML Sitemap meaning: An XML sitemap is a file that lists the URLs a site wants search engines to find, optionally with last-modified dates.

An XML sitemap is a file in the sitemaps.org format. The root element is urlset, and each page gets a url entry with a required loc tag holding its full absolute URL. An optional lastmod tag records when the page last changed meaningfully. Google uses lastmod only if it stays consistently accurate, and it ignores the priority and changefreq tags completely.

Each sitemap file can hold up to 50,000 URLs or 50 MB uncompressed, whichever limit comes first. The file must be UTF-8 encoded and can be gzipped. Larger sites split their URLs across several sitemaps and list them in a sitemap index file, which follows the same limits. The index then becomes the one file you submit.

There are two ways to tell Google about a sitemap: submit it in the Sitemaps report in Search Console, or add a Sitemap line to robots.txt. Listing a URL is a suggestion, not a guarantee of crawling or indexing. Only include canonical URLs that return 200 and that you actually want indexed.

An XML sitemap is written for search engines. An HTML sitemap is a regular web page that links to your sections for human visitors. A site can have either, both, or neither.

Example

Submitting /sitemap-index.xml in Search Console.

Often confused with

XML sitemap vs HTML sitemap

Learn it step by step

Practice it with a short, free lesson in Technical SEO. No sign-up needed.

Open the lesson

Also used in: SEO for Beginners

Related terms