A `sitemap.xml` file is an XML document that provides search engines with information about the pages on a website. It helps improve the site's visibility and indexing. Here's a basic structure of a `sitemap.xml`:
```xml
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap-image/1.1">
<url>
<loc>https://www.example.com/</loc>
<lastmod>2023-10-01</lastmod>
<changefreq>monthly</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>https://www.example.com/about</loc>
<lastmod>2023-09-15</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>https://www.example.com/contact</loc>
<lastmod>2023-08-10</lastmod>
<changefreq>yearly</changefreq>
<priority>0.5</priority>
</url>
</urlset>
```
### Key Elements
<url>: Represents a single URL entry.
<loc>: Specifies the location of the URL.
<lastmod>: Indicates the last modification date of the URL.
<changefreq>: Suggests how frequently the content changes (e.g., daily, weekly, monthly).
<priority>: Indicates the priority of the URL relative to other URLs on the site (scale from 0.0 to 1.0).
A well-structured `sitemap.xml` can help search engines crawl a website more effectively, leading to better indexing and potentially improved search rankings.