sitemap.xml
A
sitemap.xml file is an XML file that lists the URLs of a website. It helps search engines like Google understand the structure of your site and find all of its pages more easily. Here are some key components and features of a
sitemap.xml file:
- XML Format: The file is written in XML format, which is structured and machine-readable.
- URL Entries: Each URL entry is enclosed in
<url> tags, which include:
<loc>: The URL of the page.
<lastmod>: The last modification date of the page.
<changefreq>: How frequently the page is likely to change (e.g., daily, weekly).
<priority>: The priority of the page relative to other pages on the site.
- Multiple URLs: A
sitemap.xml can contain multiple URLs, typically up to 50,000 URLs per file.
- Index Files: If you have more than 50,000 URLs, you can create an index file that links to additional sitemap files.
- Submission: You can submit your
sitemap.xml to search engines via their webmaster tools to improve indexing.
Here is a simple example of a
sitemap.xml file:
<?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>monthly</changefreq>
<priority>1.0</priority>
</url>
&