sitemap.xml
The `sitemap.xml` file is an important component for SEO and website navigation. It provides search engines with information about the pages on your site. Here’s a brief overview of its structure and purpose:
- Definition: A sitemap.xml file is an XML file that lists the URLs for a site along with additional metadata.
- Purpose:
- Helps search engines discover and index your site’s pages.
- Informs search engines about the importance of pages.
- Provides information on how often pages are updated.
- Indicates the last time a page was modified.
- Basic Structure:
-
urlset: The root element that contains all url entries.
-
url: Each entry represents a single 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:
<?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>
</urlset>
Including a `sitemap.xml` file