SEO (Search Engine Optimization)
Types of sitemaps
There are two main types of sitemaps: HTML sitemaps and XML sitemaps.
-
HTML sitemaps: HTML sitemaps are designed for users and provide a navigation structure for the website. They typically include links to all of the pages on a website, organized in a hierarchical structure. For example, a website that sells shoes might have an HTML sitemap that lists all of the categories of shoes, such as "Running Shoes," "Basketball Shoes," and "Dress Shoes," and provides links to the pages for each category.
-
XML sitemaps: XML sitemaps are designed for search engines and provide information about each page on a website, such as the page's URL, update frequency, and importance relative to other pages. XML sitemaps are typically submitted to search engines through the website's Search Console account. An example of an XML sitemap for a website might look like this:
HTML sitemap
An HTML sitemap is a web page that lists all of the pages on a website, organized in a hierarchical structure. HTML sitemaps are designed for users, and provide a clear navigation structure for the website.
Here is an example of an HTML sitemap for a website that sells shoes:
HTML sitemaps are designed to be user-friendly, and provide a way for users to navigate the website's structure and content. They typically include links to all of the pages on a website, organized in a hierarchical structure. Here's an example of an HTML sitemap for a website that sells shoes:
Example code
<ul>
<li><a href="/">Home</a></li>
<li><a href="/running-shoes">Running Shoes</a></li>
<li><a href="/basketball-shoes">Basketball Shoes</a></li>
<li><a href="/dress-shoes">Dress Shoes</a></li>
<li><a href="/about-us">About Us</a></li>
<li><a href="/contact-us">Contact Us</a></li>
</ul>
In this example, the HTML sitemap provides a list of links to all of the pages on the website, including the home page, the pages for each category of shoes, and the pages for the "About Us" and "Contact Us" sections. This makes it easy for users to find the information they are looking for and navigate the website.
XML sitemap
XML sitemaps are designed to be used by search engines, and provide information about each page on a website, such as the page's URL, update frequency, and importance relative to other pages. Here's an example of an XML sitemap for a website:
Example code:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>http://www.example.com/page1.html</loc>
<lastmod>2021-12-31</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
<url>
<loc>http://www.example.com/page2.html</loc>
<lastmod>2021-12-31</lastmod>
<changefreq>monthly</changefreq>
<priority>0.5</priority>
</url>
</urlset>
In this example, the XML sitemap lists the URL for each page on the website, the date the page was last modified, the frequency with which the page is expected to change, and the relative importance of each page compared to other pages on the website.