A `sitemap.xml` file is an XML file that lists the URLs for a site along with additional metadata about each URL. This helps search engines like Google to better crawl and index the site. Here are the key components:
- URL: The specific address of a webpage.
- Last Modified: The date when the content was last updated.
- Change Frequency: How often the content is likely to change (e.g., daily, weekly, monthly).
- Priority: The importance of the URL relative to other URLs on the site.
Here’s an example structure 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
http://www.example.com/contact
2023-08-10
yearly
0.5
In this example:
- Each
block contains information about a specific page.
- The element specifies the URL.
- The element indicates the last modification date.
- The and elements provide additional information for search engines.
Using a `sitemap.xml` can improve the visibility of your web pages in search engine results.