A sitemap is a file that contains a list of all the pages and content on a website. Its purpose is to help both users and search engines understand the structure and organization of a website’s content.
Typically, a sitemap includes details such as the URLs of each page on the site, when each page was last updated, and the relative importance of each page compared to others on the site. There are two types of sitemaps: XML sitemaps and HTML sitemaps.
XML sitemaps are intended for search engines and are commonly submitted to them to assist in crawling and indexing the website’s content. They are a standardized format for providing information about a website’s pages to search engines. This format is based on XML, a markup language used to encode documents in a format that is readable by humans and machines.
The format of an XML sitemap typically includes a root element called <urlset> that contains one or more <url> elements. Each <url> element contains information about an individual URL on the website, such as the URL of the page (<loc>), when it was last modified (<lastmod>), how frequently it changes (<changefreq>), and its relative importance compared to other pages on the site (<priority>).
XML sitemaps are usually saved as plain text files with the file extension .xml and named “sitemap.xml”. They should be placed in the root directory of the website. For example, if the website URL is “https://www.example.com”, the sitemap URL would be “https://www.example.com/sitemap.xml”.
Once the sitemap has been created and uploaded to the website, it can be submitted to search engines to assist them in crawling and indexing the site’s content. Most search engines offer a way to submit a sitemap through their webmaster tools or search console. For instance, Google Search Console has a “Sitemaps” section where website owners can submit their sitemap. Bing Webmaster Tools also has a section to submit sitemap.
Google Search Console
Bing Webmaster Tools
Submitting a sitemap to search engines can enhance the visibility and indexing of a website’s content, which can lead to better search engine rankings and increased traffic to the site.
HTML sitemaps, on the other hand, are created for users and are often linked to from the website’s footer or navigation menu to help them find the content they need.