Sitemap

Overview

The sitemap is an XML document that lists various URLs on a website, ensuring that search engines can discover and index them effectively.

Structure

The sitemap typically includes the following sections:

URL Entry

Each URL entry can contain:

  • loc: URL of the page.
  • lastmod: Last modification date.
  • changefreq: Change frequency hint for search engines. Options include hourly, daily, weekly, monthly, yearly, or never.
  • priority: Priority of the URL relative to other pages on the site (0.0 to 1.0).

Example of a Sitemap Entry

<url>
  <loc>https://example.com/page1</loc>
  <lastmod>2023-10-01</lastmod>
  <changefreq>monthly</changefreq>
  <priority>0.8</priority>
</url>

Benefits of a Sitemap

  • Improves site visibility in search engines.
  • Helps search engines understand the structure of the site.
  • Can indicate to search engines which pages are most important.