A `sitemap.xml` file is an XML file that helps search engines understand the structure of your website. It contains information about the pages, videos, and other files on your site, as well as the relationships between them. Here's a basic outline of how a `sitemap.xml` is structured:
- XML Declaration:
- Defines the XML version and encoding.
- URL Set:
- Wraps the individual URLs.
- Example:
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap-image/1.1">
- URL Entry:
- Each URL is enclosed in
<url> tags.
- Contains the following elements:
<loc>: the URL of the page.
<lastmod>: the last modified date of the page.
<changefreq>: how often the page is likely to change.
<priority>: the priority of the URL relative to other URLs on your site.
Here’s a simple example of a `sitemap.xml`:
<?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