A sitemap.xml is an XML file that lists the pages of a website to help search engines like Google understand its structure. Here’s a brief overview of its components:
- URL Set: Contains all the URLs of the website.
- Last Modified: Indicates the last time a page was updated.
- Change Frequency: Suggests how often a page is likely to change (e.g., daily, weekly).
- Priority: Indicates the importance of a page relative to other pages on the site.
Here’s a basic example of a sitemap.xml structure:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap-image">
<url>
<loc>http://www.example.com/</loc>
<lastmod>2023-10-01</lastmod>
<changefreq>monthly</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>http://www.example.com/about</loc>
<lastmod>2023-09-15</lastmod>
<changefreq>yearly</changefreq>
<priority>0.5</priority>
</url>
</urlset>
Using a sitemap.xml can improve your site's SEO by ensuring search engines can easily crawl and index your pages.