A `sitemap.xml` file is an XML file that lists the URLs for a website along with additional metadata about each URL. This helps search engines like Google to crawl the site more effectively.
Here’s a simple structure of a `sitemap.xml` file:
```xml
http://www.example.com/
2023-10-01
daily
1.0
http://www.example.com/about
2023-09-15
monthly
0.8
http://www.example.com/contact
2023-09-10
yearly
0.5
```
### Key Elements in `sitemap.xml`:
- <urlset>: The root element that contains all the URLs.
- <url>: Each URL entry is wrapped in this tag.
- <loc>: Specifies the URL of the page.
- <lastmod>: Indicates when the page was last modified.
- <changefreq>: Suggests how frequently the page is likely to change.
- <priority>: Indicates the priority of the page relative to other pages on the site.
Creating a `sitemap.xml` helps improve SEO by making it easier for search engines to discover and index your content.