sitemap.xml
A sitemap.xml file is an XML file that helps search engines understand the structure of a website. It lists the pages on your site and provides important information about them. Here’s a simple overview of its components:
- URL Entries: Each URL entry typically includes:
- loc: The location of the webpage.
- lastmod: The last modified date of the URL.
- changefreq: How frequently the page is likely to change.
- priority: The priority of the page relative to other pages on the site.
- File Format: The sitemap must be formatted in XML, starting with the <?xml version="1.0" encoding="UTF-8"?> declaration.
- Example Structure:
- <urlset xmlns="http://www.sitemaps.org/schemas/sitemap-image">
- <url>
- <loc>http://www.example.com/
- <lastmod>2023-10-01
- <changefreq>weekly
- <priority>1.0
- </url>
- </urlset>
Creating a sitemap.xml file helps improve your site's visibility in search engines, making it easier for crawlers to find and index your content.