A `sitemap.xml` file is an XML file that lists the URLs of a website to inform search engines about the pages on the site. This helps with SEO and ensures that search engines can discover and index all relevant pages.
Here’s a simple outline of what a `sitemap.xml` file typically includes:
- URL: The address of a specific page on your website.
- Last Modified: The date when the page was last updated.
- Change Frequency: How often the page is expected to change (e.g., daily, weekly).
- Priority: The importance of the page relative to other pages on the site (scale of 0.0 to 1.0).
Here’s an example of a simple `sitemap.xml` structure:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap-image/1.1">
<url>
<loc>https://www.example.com/</loc>
<lastmod>2023-10-01</lastmod>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>https://www.example.com/about</loc>
<lastmod>2023-09-15</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
</urlset>
Make sure to update your `sitemap.xml` regularly, especially when adding new content to your site. You can submit it to search engines like Google via their webmaster tools.