sitemap.xml is an XML file that helps search engines understand the structure of your website. It lists the pages, videos, and other files on your site to ensure that search engines can discover and index them effectively.
- Purpose:
- Improves site visibility
- Helps search engines crawl your site
- Provides metadata about specific files
- Components:
- URL of each page
- Last modified date
- Change frequency (how often the page is updated)
- Priority (importance of the page relative to others)
- Format:
- Must be in XML format
- Typically includes a
<urlset> element
- Each page is enclosed in a
<url> element
Example:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap-image">
<url>
<loc>http://www.example.com/</loc>
<lastmod>2023-10-01</lastmod>
<changefreq>monthly</changefreq>
<priority>1.0</priority>
</url>
</urlset>
Remember to submit your
sitemap.xml file to search engines like Google and Bing to enhance your site's SEO.