sitemap.xml
A `sitemap.xml` file is an XML document that provides search engines with information about the pages on your website. It helps search engines discover and index your content more effectively. Below is a simple explanation of its structure and purpose:
- Purpose:
- Informs search engines about your site's pages.
- Helps improve SEO by making it easier for search engines to find and crawl your content.
- Structure:
- URL Set: The root element that contains the list of URLs.
- URL: Each individual page is wrapped in a
<url> tag.
- Location: The URL of the page is specified within a
<loc> tag.
- Last Modified: The date the page was last modified can be included using a
<lastmod> tag.
- Change Frequency: You can suggest how often the page is updated with a
<changefreq> tag.
- Priority: A value between 0.0 and 1.0 indicating the priority of the page with a
<priority> tag.
Example:
<?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>
<url>
<loc>https://www.example.com/about</loc>