sitemap.xml
A `sitemap.xml` file is an important component of a website that helps search engines understand the structure and content of the site. Here’s a simple outline of what a `sitemap.xml` file typically includes:
- XML Declaration: This indicates that the file is in XML format.
- URL Set: The root element that contains all URLs.
- URL: Each URL entry is wrapped in a
<url> tag.
- Loc: The URL of the page, wrapped in
<loc>.
- Lastmod: The date the page was last modified, wrapped in
<lastmod>.
- Changefreq: How frequently the page is likely to change, wrapped in
<changefreq>.
- Priority: The priority of the page relative to other pages on the site, wrapped in
<priority>.
Here’s a simple example of what a `sitemap.xml` might look like:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap-image">
<url>
<loc>https://www.example.com/</loc>
<lastmod>2023-10-01</lastmod>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>https://www.example.com/about</loc>
<lastmod>2023-09-15</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>