A sitemap.xml file is an XML file that helps search engines understand the structure of your website. It provides information about the pages, videos, and other files on your site, along with their relationships. Here’s a simple overview:
- Purpose: To inform search engines about the pages on your site that are available for crawling.
- Content:
- URL of each page
- Last modified date of each page
- Change frequency (how often the page is updated)
- Priority (importance of the page relative to others)
- Format: XML format that adheres to specific standards.
- Accessibility: Typically located at www.yoursite.com/sitemap.xml.
To create a basic sitemap.xml file, you can use the following structure:
<?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>daily</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>http://www.example.com/about</loc>
<lastmod>2023-10-01</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
</urlset>
This file helps search engines efficiently crawl and index your website, improving your site's visibility in search results.