A `sitemap.xml` file is an essential tool for website owners, as it helps search engines understand the structure of a site. Below is a basic outline of how a `sitemap.xml` file is structured:
- XML Declaration
- Defines the document as an XML file.
- URL Set
- <urlset>
- Root element that contains all the URL entries.
- <url>
- Each URL entry is nested within this tag.
- <loc>
- Specifies the URL of the webpage.
- <lastmod>
- Indicates the last modification date of the URL.
- <changefreq>
- Suggests how frequently the page is likely to change (e.g., daily, weekly).
- <priority>
- Defines the priority of the URL relative to other URLs on the site.
Here is a simple example of a `sitemap.xml` file:
http://www.example.com/
2023-01-01
monthly
1.0
http://www.example.com/about
2023