A *sitemap.xml* file is used to inform search engines about pages on your site that are available for crawling. Here’s a brief overview of its components and structure:
- XML Declaration:
- Defines the file as an XML document.
- urlset:
- The root element that contains all the url entries.
- url:
- Contains information about a specific URL.
- loc: The location of the URL.
- lastmod: The last modification date of the URL.
- changefreq: How frequently the page is likely to change.
- priority: The priority of the URL relative to other URLs on the site.
Here’s a simple example of a *sitemap.xml* file:
http://www.example.com/
2023-10-01
monthly
1.0
http://www.example.com/about
2023-09-15
yearly
0.8
This structure helps search engines understand the organization of your site and can contribute to better indexing.