A `sitemap.xml` file is an XML file that provides information about the pages, videos, and other files on your site, and the relationships between them. It helps search engines like Google to crawl your website more intelligently.
Here are some key components of a `sitemap.xml` file:
- URL Entry: Each URL entry contains the following elements:
- loc: The URL of the page.
- lastmod: The date the page was last modified.
- changefreq: The frequency at which the page is likely to change (e.g., daily, weekly, monthly).
- priority: The priority of the page relative to other pages on the site (ranges from 0.0 to 1.0).
- XML Declaration: The file should start with an XML declaration like:
- Namespace: Include the sitemap namespace:
Here’s a simple example of a `sitemap.xml` file:
https://www.example.com/
2023-10-01
daily
1.0
https://www.example.com/about
2023-09-15
monthly
0.8
Make sure to keep your `sitemap.xml` up