sitemap.xml
A `sitemap.xml` file is an XML file that lists the URLs of a website to help search engines like Google understand the structure of the site. Here are some key points about `sitemap.xml`:
- Purpose: It informs search engines about pages on your site that are available for crawling.
- Benefits:
- Improved Indexing: Ensures that search engines find and index all important pages.
- Priority Settings: You can set priority levels for pages.
- Update Frequency: Indicates how often pages are updated.
- Structure: A typical `sitemap.xml` includes:
- URL: The location of the webpage.
- Last Modified: The date the page was last updated.
- Change Frequency: How often the page changes.
- Priority: The importance of the page relative to others on the site.
Example:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap-image/1.1">
<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.8</priority>
</url>
</urlset