A `sitemap.xml` file is an important tool for search engines, providing a structured list of pages on a website. Here's a simple breakdown of what it typically includes:
- XML Declaration: The file starts with an XML declaration to define the version.
- URL Set: The main container for the list of URLs, using the urlset tag.
- URLs: Each URL is enclosed in url tags that contain:
- loc: The location of the URL.
- lastmod: The date the URL was last modified.
- changefreq: How frequently the content is expected to change.
- priority: The priority of the URL relative to other pages.
Here’s a basic example of what a `sitemap.xml` file looks like:
https://www.example.com/
2023-10-01
monthly
1.0
https://www.example.com/about
2023-09-15
yearly
0.8
This structure helps search engines efficiently crawl and index the website's content.