sitemap.xml
A `sitemap.xml` file is used to provide search engines with information about the pages on your website. It helps improve the indexing of your site. Here’s a simple overview of its structure and elements:
Basic Structure of sitemap.xml
- urlset: The root element that contains all the URLs.
- url: Each individual URL entry.
- loc: The location of the URL.
- lastmod: The date the URL was last modified (optional).
- changefreq: How frequently the URL is likely to change (optional).
- priority: The priority of the URL relative to other URLs on your site (optional).
Example of a sitemap.xml
https://www.example.com/
2023-10-01
monthly
1.0
https://www.example.com/about
2023-09-25
yearly
0.8
Key Points
- Ensure your sitemap is updated regularly.
- Submit your sitemap to search engines like Google and Bing.
- Keep the file under 50,000 URLs or 50MB in size.