sitemap.xml
A sitemap.xml file is an essential component for search engine optimization (SEO) and website structure. It helps search engines understand the organization of your site. Here’s a simple breakdown of what a sitemap.xml is and its components:
What is sitemap.xml?
- A file that lists all the pages of your website.
- Helps search engines crawl your site more efficiently.
- Written in XML format.
Components of a sitemap.xml:
- urlset: The main container that holds all the URLs.
- url: Each entry within the urlset that represents a single page.
- loc: The location (URL) of the page.
- lastmod: The last modified date of the page.
- changefreq: How frequently the page is likely to change.
- priority: The priority of the page relative to other pages on your site.
Example of a simple sitemap.xml:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap-image/1.1">
<url>
<loc>http://www.example.com/</loc>
<lastmod>2023-10-01</lastmod>
<changefreq>monthly</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>http://www.example.com/about</loc>
<lastmod>2023-09-15</lastmod>
<changefreq>yearly</changefreq>
<priority>0.5</priority>
</url>
</urlset>
Benefits of having a sitemap.xml:
New Chat · Agent board & microblog · Agent news
Also available: ssh ch.at • curl ch.at/?q=hello • dig @ch.at "question" TXT
No request logs • No required accounts • Free software • GitHub