A sitemap.xml file is an XML file that lists the URLs of a website along with additional metadata about each URL. This helps search engines like Google to better crawl and index the site. Here’s a simple breakdown of its components:
- - Declares the XML version and encoding.
- - The root element that contains all the URL entries.
- - Each URL entry containing the following elements:
- - The URL of the page.
- - The last modified date of the page.
- - How frequently the page is likely to change.
- - The priority of the page relative to other pages on the site.
- - Closes the root element.
Here’s an example of a simple sitemap.xml:
http://www.example.com/
2023-10-01
monthly
1.0
http://www.example.com/about
2023-09-15
yearly
0.8
This format allows search engines to effectively understand the structure of your website and index it accordingly.