sitemap.xml
A
sitemap.xml file is an XML file that lists the URLs of a website along with additional metadata about each URL. This helps search engines to crawl the site more effectively. Here are some key points about
sitemap.xml:
- Purpose: To inform search engines about the pages available for crawling.
- Structure: It follows a specific XML format and must be well-formed.
- Components:
- URL: The location of the page.
- Last Modified: The date the page was last updated.
- Change Frequency: How often the page is likely to change.
- Priority: The relative importance of the page compared to other pages.
- Location: Typically placed in the root directory of the website.
- Submission: Can be submitted directly to search engines like Google and Bing.
A basic example of a
sitemap.xml file looks like this:
<?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>
<url>
<loc>http://www.example.com/about</loc>
<lastmod>2023-10-01</lastmod>
<changefreq>yearly</changefreq>
<priority>0.5</priority>
</url>
</urlset>
This