A sitemap.xml file is used to inform search engines about pages on your site that are available for crawling. Here’s a simple breakdown of what it typically contains:
- XML Declaration: Indicates the file is in XML format.
- urlset: The root element that encompasses all URLs.
- url: Each URL entry contains several sub-elements:
- loc: The URL of the page.
- lastmod: The last modified 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.
Here’s a simple example of a sitemap.xml file:
http://www.example.com/
2023-10-01
daily
1.0
http://www.example.com/about
2023-09-25
monthly
0.8
Make sure to update your sitemap.xml regularly to reflect changes in your website’s structure!