A `sitemap.xml` file is an XML document that helps search engines understand the structure of a website. It lists all the important pages, allowing search engines to crawl the site more intelligently. Here’s a simple explanation of its components:
- URL Set: Contains the URLs of the pages you want to be indexed.
- Last Modified: Indicates the last time a page was updated.
- Change Frequency: Suggests how often the page is likely to change (e.g., daily, weekly).
- Priority: Indicates the importance of a page relative to other pages on the site.
Here is a basic example of a `sitemap.xml` structure:
http://www.example.com/
2023-10-01
weekly
1.0
http://www.example.com/about
2023-09-15
monthly
0.8
http://www.example.com/contact
2023-10-01
yearly
0.5
This document should be placed at the root of your website (e.g., `http://www.example.com/sitemap.xml`) to ensure search engines can easily find it.