A
sitemap.xml file is an XML file that provides search engines with a roadmap of your website's structure. It helps them understand the organization of your content and index it more effectively. Here are the key components of a
sitemap.xml file:
- URL Set: Contains a list of URLs on your site that you want search engines to index.
- Lastmod: Indicates the last time a URL was modified.
- Changefreq: Suggests how often the content at a URL is likely to change. Common values include:
- always
- hourly
- daily
- weekly
- monthly
- yearly
- never
- Priority: Indicates the priority of a URL relative to other URLs on your site, with values ranging from 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">
<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