A `sitemap.xml` file is an XML file that provides information about the pages, videos, and other files on a site, and how they relate to each other. It helps search engines like Google understand your site structure and index it more effectively.
Here’s a simple example of what a `sitemap.xml` might look like:
```xml
https://www.example.com/
2023-10-01
monthly
1.0
https://www.example.com/about
2023-09-15
monthly
0.8
https://www.example.com/contact
2023-08-20
yearly
0.5
```
Key elements in a `sitemap.xml` include:
- <url>: Represents a single URL entry.
- <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 (scale of 0.0 to 1.0).
Using a `sitemap.xml` helps improve your site's visibility and search engine optimization (SEO).