sitemap.xml
A sitemap.xml file is an important component of a website that helps search engines understand its structure. It is written in XML format and provides information about the pages, videos, and other files on your site, along with their relationships.
Here’s a basic structure of a sitemap.xml file:
```xml
https://www.example.com/
2023-10-01
weekly
1.0
https://www.example.com/about
2023-09-15
monthly
0.8
https://www.example.com/contact
2023-08-20
yearly
0.5
```
### Key Elements
- <urlset>: The root element that contains all the url entries.
- <url>: Represents a single URL entry.
- <loc>: Specifies the URL of the page.
- <lastmod>: Indicates the last modification date of the page.
- <changefreq>: Suggests how frequently the page is likely to change.
- <priority>: Indicates the priority of the URL relative to other URLs on the site.
### Best Practices
- Keep your sitemap.xml file under 50,000 URLs or 50MB in size.
- Update the file whenever you add or remove content from your site.
- Submit your sitemap to search engines like Google and Bing