sitemap.xml
A sitemap.xml file is an important tool for SEO and helps search engines understand the structure of your website. Here’s a basic overview of what it is and how it’s structured:
What is sitemap.xml?
- sitemap.xml is an XML file that lists all the important pages on your website.
- It helps search engines like Google, Bing, and others to crawl your site more effectively.
- It can also provide metadata about each URL, such as the last modified date and change frequency.
Basic Structure of sitemap.xml
- The file must start with an XML declaration:
-
<?xml version="1.0" encoding="UTF-8"?>
- Followed by the urlset tag:
-
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap-image/1.1">
- Each URL is wrapped in a url tag:
-
<url>
- Within each url tag, you can include:
- loc: the URL of the page
- lastmod: the last modified date of the page
- changefreq: how often the page is likely to change
- priority: the priority of the page relative to other pages on your site
- Close the url tag and the urlset tag:
-
</url>
-
</urlset>
Example of a simple sitemap.xml
<?xml version="1.0" encoding="UTF-8"?&