A `sitemap.xml` file is an XML file that helps search engines understand the structure of your website. It lists all the important pages and helps ensure that they are indexed properly. Here’s a simple outline of what a `sitemap.xml` file typically includes:
- URL Set: The main container for all the URLs.
- URL: Each URL entry contains:
- loc: The location of the URL.
- lastmod: The date the page was last modified.
- changefreq: How frequently the page is likely to change.
- priority: The priority of the page relative to other pages on the site.
Here’s a simple example of what a `sitemap.xml` file might look like:
<?xml-stylesheet type="text/xsl" href="sitemap.xsl" ?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap-image/1.1">
<sitemap>
<loc>http://www.example.com/sitemap1.xml</loc>
<lastmod>2023-10-01</lastmod>
</sitemap>
<sitemap>
<loc>http://www.example.com/sitemap2.xml</loc>
<lastmod>2023-10-02</lastmod>
</sitemap>
</sitemapindex>
This structure helps search engines navigate your site efficiently, ensuring all your important content gets indexed properly.