A `sitemap.xml` file is an important part of a website's SEO strategy. It helps search engines understand the structure of your site and index your pages more effectively. Below is a simple overview of what a `sitemap.xml` file typically includes:
- XML Declaration: The file starts with an XML declaration specifying the version.
- URL Set: The root element is <urlset>, which contains multiple <url> entries.
- URL Entries: Each <url> entry includes:
- <loc>: The URL of the page.
- <lastmod>: The last modified date of the page.
- <changefreq>: How frequently the page is likely to change (e.g., daily, weekly).
- <priority>: The relative priority of the URL compared to other URLs on the site (0.0 to 1.0).
Here is a simple example of a `sitemap.xml` file:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap-image/1.1">
<url>
<loc>http://www.example.com/</loc>
<lastmod>2023-10-01</lastmod>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>http://www.example.com/about</loc>
<lastmod>2023-10-01</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<