A `sitemap.xml` file is an XML file that lists the URLs of a website to inform search engines about the organization of the site's content. Here is a simple outline of what a `sitemap.xml` file can include:
- URLSet: The root element that defines the XML namespace.
- URL: Each URL entry contains the following child elements:
- loc: The URL of the page.
- lastmod: The date the page was last modified.
- changefreq: How often the page is likely to change (e.g., daily, weekly, monthly).
- priority: The priority of the page relative to other pages on the site (value between 0.0 and 1.0).
Here is an example of a simple `sitemap.xml` structure:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap-image">
<url>
<loc>https://www.example.com/</loc>
<lastmod>2023-10-01</lastmod>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>https://www.example.com/about</loc>
<lastmod>2023-10-01</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
</urlset>
This structure helps search engines efficiently crawl and index the site, improving visibility in search results.