A `sitemap.xml` file is an XML file that helps search engines understand the structure of your website. It lists all the URLs of the web pages you want to be indexed and can include additional information about each page.
Here’s a simple example of a `sitemap.xml` file:
```xml
https://www.example.com/
2023-10-01
monthly
1.0
https://www.example.com/about
2023-10-01
yearly
0.8
https://www.example.com/contact
2023-10-01
yearly
0.5
```
Key components of a `sitemap.xml` include:
- <urlset>: The root element that contains all the URLs.
- <url>: Each individual URL entry.
- <loc>: The location (URL) of the page.
- <lastmod>: The last modification date of the page.
- <changefreq>: How frequently the page is likely to change.
- <priority>: The priority of the page relative to other pages on the site.
Using a `sitemap.xml` file can improve your site's SEO by ensuring that search engines can find and index all your important pages.