A sitemap.xml file is an important tool for website SEO. It helps search engines understand the structure of your site. Here’s a simple overview of how to create and what to include in a sitemap.xml:
- XML Declaration: Start with the XML declaration at the top.
- URL Set: Use the urlset tag to define the set of URLs.
- URL Entries: For each page, include the following within url tags:
- loc: The URL of the page.
- lastmod: The last modified date of the page.
- changefreq: How frequently the page is likely to change (e.g., daily, weekly).
- priority: The priority of the page relative to other pages on the site.
Here’s a simple example of a sitemap.xml:
https://www.example.com/
2023-10-01
daily
1.0
https://www.example.com/about
2023-09-15
monthly
0.8
Make sure to update your sitemap regularly to reflect changes in your website. Once created, submit it to search engines to improve your site's visibility.