Sitemaps are structured lists of all URLs on your website with a list of their parameters. The main function of a sitemap is to make it easier for search engines to understand and index the content of your website. A website sitemap is also a useful tool in case you want to ensure that Googlebot is able to see all the content that you have on your website. Fortunately, the majority of CMS systems enable the site owners to generate one.
There are up to six different types of sitemaps, but HTML and XML are two sitemaps that are commonly used. In this article, we will point out their importances and how to generate them in Magento 2.
In simple terms, an HTML sitemap is an outline text version of the site navigation on one page. This type of sitemap is essential for any kind of website, whether it is ecommerce, non-profit, blog or entertainment website. HTML sitemap performs an important function in making it easier for some users to navigate through the website since all the resources they might need are quickly accessible.
The importance of HTML sitemap
The greatest HTML sitemap benefit is that it is a great way to have a clear overview of the website and all its pages. This makes sitemap a reliable navigation tool. It is also available any time at the website footer. In most of the cases, providing a proper HTML sitemap will improve the user experience. And thus it has an impact on your website’s ranking.
Furthermore, promoting your online presence, this type of sitemap is valuable. Because the page has search engines will read in order to understand and index your website among the others. Search engine optimization is especially helpful for the websites with dynamic content. Especially when the information on the website is new and does not have many links to it. Or when some articles contain a lot of content while being not properly linked.
An XML sitemap is a text file used to detail all URLs on a website. It can include extra data on each URL, including the information addressing its latest update, its priority level, the average frequency changes occur, the URLs relation to the rest of the site, and whether there are any other versions of the same URL in other languages. According to Google documentation, XML sitemaps are useful for websites with large archive or a large volume of media content, although, in our opinion, even if your webstore does not match these characteristics, it will still largely benefit from having a sitemap.
The sitemap protocol format contains XML tags and should:
- Begin with <urlset> opening tag and end with </urlset> closing tag.
- Include a <url> entry for URLs as a parent XML tag.
- Specify the namespace (protocol standard) inside the <urlset> tag.
- Include a <loc> child entry for <url> parent tags.
Other tags are optional and their support may vary from search engine to search engine. So, before including any of those optional tags, consult the documentation for each search engine.
Why XML sitemaps are important?
Creating sitemaps is especially useful for SEO. An XML sitemap is designed for search bots, and an updated XML file can be used to ping search engines, alerting them of changes and updates. An XML document lets search engines know that there is fresh new content. Having a well-built XML sitemap substantially increases your chances of having your web-pages crawled. It also indexed by the search engines, particularly if the navigation system of the website does not work properly. Or general internal linking strategy doesn’t provide links to all of your pages.
If your website is international or has the same page translated into different languages, the XML sitemap can be used with the purpose of sorting the content for the search engines. The sitemap will be able to signal the crawlers that the page has multiple versions. And they will use this information to make sure that the users will be provided with the correct version of the website, based on their language or location.
What is the difference between an HTML and XML sitemap?
Since the article is dedicated to two sitemaps, it is important to understand clearly the difference between both of them. So, this paragraph is dedicated to the HTML sitemap vs XML sitemap comparison.
HTML and XML sitemaps have different uses and values for search engine optimization. The main difference between HTML and XML sitemaps is that HTML sitemaps are written primarily for the users and needed most to help them to gain a comprehensive understanding of a website. And XML sitemaps are written first of all for search engines.
HTML sitemap is rather a general overview of the website, the pages, and information. These could be useful to the user. While being used mostly by the visitors of a website, it can also assist the search engine ranking.
In a nutshell, XML is primarily created to facilitate the functionality of the search engines, providing them with all the necessary information regarding the structure of the website.
How to generate a sitemap in Magento 2
In order to generate a sitemap in Magento 2 you’ll need to go through the following process:
Step 1: Login to your Admin account and proceed to Stores →Settings→ Configuration → Catalog→ XML Sitemap. Edit the necessary settings for the Categories Options, Product Options and CMS Pages Options:
Step 2: Open the Generation Settings, change their status to Enable, choose a Start Time you would like search engines to crawl your pages from, select the crawling frequency, enter the Error Email Recipient and Error Email Sender. The Error Email Template field may be left with its default value:
Step 3: Specify the Maximum Number of URLs Per File and Maximum File Size limits in the section called Sitemap File Limits:
Step 4: After configuring the Sitemap File Limits settings, proceed further by expanding the Search Engine Submission Settings menu and set the corresponding value of Enable Submission to Robots.txt field to Yes. Click Save Config button to save all the changes we’ve made so far:
How to generate a sitemap in Magento 2 manually
If you don’t have a cron job set-up for your site and would like to generate a sitemap for it, consider creating a sitemap in Magento 2 manually.
Go through these steps for a manual set-up process:
Step 1: Open the Sitemap setting page by navigating to Marketing → SEO & Search → Site Map and click the Add Sitemap button:
Step 2: Enter the necessary values for your Filename, specify the Path and choose the most appropriate Store view. Click Save if you would like to only add a new sitemap without generating it. Alternatively, hit the Save & Generate button in case you’ll need a latter operation as well:
Step 3: Once you’ve chosen your preferred option, copy the generated Link for Google and submit it to the appropriate section of your Google Webmaster Tools account:
Level up your website with ArrowHiTech – Official Magento’s Partner
Our Magento web development service is plus the option for monthly support packages to make sure your online business always remains in top form. And of course, there are countless other developer websites that can be easily found and perused as well.
ArrowHiTech Development Agency
With over 12 years of operation, ArrowHiTech is official Magento’s partner. We has increasingly widened our skills and resources to meet all the requirements of customers all over the world on Web design and development with flexible and reasonable price!
- Headquarter: Vietnam
- Website: https://www.arrowhitech.com/
- Contact: email@example.com