A `sitemap.xml` file is an important tool for search engines to understand the structure of your website. It lists all the pages you want search engines to index. Here’s how to create a simple `sitemap.xml`:
```xml
http://www.example.com/
2023-10-01
daily
1.0
http://www.example.com/about
2023-10-01
monthly
0.8
http://www.example.com/contact
2023-10-01
yearly
0.5
```
### Key Elements of `sitemap.xml`:
- <urlset>: The root element that defines the sitemap.
- <url>: Contains information about each URL.
- <loc>: The location 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 (0.0 to 1.0).
Make sure to update your `sitemap.xml` regularly to reflect any changes on your website. Once created, submit it to search engines like Google through their webmaster tools to help improve your site's visibility.