A sitemap.xml file is an XML file that provides search engines with information about the pages, videos, and other files on a site, as well as the relationships between them. It helps search engines crawl the site more intelligently.
Here’s a simple overview of the structure of a sitemap.xml file:
- XML Declaration: Indicates that the file is an XML document.
- urlset: The root element that contains all the URLs.
- url: Each URL entry contains the details of a page.
- loc: The URL of the page.
- lastmod: The date the page was last modified.
- 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
monthly
1.0
http://www.example.com/about
2023-09-15
monthly
0.8
This file helps search engines understand the structure of your website, making it easier to index the pages correctly.