Sitemap

Introduction

A sitemap is a crucial component of a website. It provides information about the pages and files that make up your site and enables search engines to read your website more intelligently.

XML Sitemap Structure

  • <urlset>: The root element of an XML sitemap.
    • <url>: Contains information for each URL.
      • <loc>: The URL of the page.
      • <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.

Example of an XML Sitemap

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/image/1.1">
    <url>
        <loc>https://www.example.com/</loc>
        <lastmod>2023-10-01</lastmod>
        <changefreq>daily</changefreq>
        <priority>1.0</priority>
    </url>
</urlset>

Conclusion

Creating a proper sitemap can significantly improve your website's visibility in search engine results.