Magento 2 Sitemap Suite Manual

Sitemap Suite Cover

Introduction

Magento 2 Sitemap Suite lets merchants create and manage fully-fledged HTML and XML sitemaps. The HTML Sitemap is not provided in the default Magento 2 installation. By means of this extension the store owner can create separate HTML sitemaps for different Store Views, split all store links by categories, include CMS pages and any extra links, set the product sorting order etc. The XML Sitemap extends the basic functionality that is provided out of the box in Magento 2. It allows to create an extended XML sitemap, where it’s possible to exclude out-of-stock products from the XML sitemap, exclude basically any product, category and CMS page from the list, generate the XML sitemap right from Console, and much more.

Though sitemaps do not boost the search rankings, they help the search engines to better crawl your website.

Requirements and Installation

Sitemap Suite extension supports both Community and Enterprise edition of Magento starting from version 2.1. The current version of the Magento installed on your website can be found in the lower right corner of any backend page.

Magento 2 Version

Sitemap Suite extension has 2 separate ways of installation: via Composer or by copying the code.

Installation Via Composer

  1. Create a folder anywhere on your server (preferably not in the Magento installation directory). Put the zip archive into this folder.

  2. Use any SSH client to connect to your server. Navigate to the root Magento folder. Bear in mind that the user should write permissions to this folder and its subfolders.

  3. Add the folder with the extension's archive as a repository. For this, run the Composer command:

    composer config repositories.mageworx artifact {/ABSOLUTE/PATH/TO/FOLDER}
    

    like:

    composer config repositories.mageworx artifact /mageworx/extensions/zip
    

    This command will add these lines to your composer.json file:

    "mageworx": {
        "type": "artifact",
        "url": "/mageworx/extensions/zip"
    }
    
  4. Perform the command:

    composer require mageworx/module-sitemapsuitemeta
    
  5. Clear the compiled code and the cache:

    php bin/magento setup:upgrade
    
  6. To update the extension via composer perform the command:

    composer update mageworx/module-sitemapsuitemeta
    

Installation by copying the code

  1. Download the extension's package from your customer account, unzip it.

  2. Use any SSH client to connect to your server. Bear in mind that the user should write permissions to this folder and its subfolders.

  3. Upload all the files and folders from the extension's package to the root Magento folder.

  4. Via SSH, navigate to the root Magento folder and perform the command:

    php bin/magento module:enable MageWorx_SeoAll MageWorx_HtmlSitemap MageWorx_XmlSitemap
    

    This extension consists of separate submodules

    All of them need to be enabled for the extension to be working correctly.

  5. Clear the compiled code and cache:

    php bin/magento setup:upgrade
    php bin/magento cache:flush
    php bin/magento setup:static-content:deploy
    

Glossary

HTML Sitemap

An HTML sitemap allows the store visitors to quickly navigate a website using a properly organized text version of the store menu. Providing clients with a well-structured sitemap you'll increase customer satisfaction. So basically, the HTML Sitemap provides the full list of the website's pages in the logical order and is created for the real clients.

XML Sitemap

An XML sitemap is written for the search bots. Magento 2 websites have hundreds or even thousands of pages so using a Sitemap is essential to help the search bot index the products pages including those that might have been ignored otherwise. Adding images to the sitemap is another feature that is quite important for better search results as images can bring you more traffic when search bot indexes them.

Extension Configuration

HTML Sitemap

To tweak the general HTML Sitemap settings, log into the Magento Admin panel and go to STORES ⟶ Configuration ⟶ MAGEWORX ⟶ SEO. The configuration of the extension is provided under the HTML Sitemap tab.

HTML Sitemap

The description of the settings will be provided in small groups for convenience' sake.

HTML Sitemap

To include Store Views links into the main HTML sitemap, enable the Show Stores setting.

The Store Views showing on the Sitemap page. The French Store View is the current one.


Show Categories option switches on/off links display of the catalog categories.

If the categories are enabled, the setting Maximum category depth level appears. It manages the maximum depth of the categories to show. This setting may be important for the websites with the difficult category structure. The default (empty) value shows all subcategories.

Show Products option switches on/off links display of the catalog products in a hierarchical structure so that every product is being displayed under the appropriate category.

If the products are enabled, the setting According to the category display mode appears. It handles the situation when the category has the display mode Static Block Only.

In this case, the products that are assigned to this category won't be shown on the Sitemap page.



HTML Sitemap

Product URL setting handles the URL structure of the product pages. If Use Categories Path is selected, then the URL will be formed like http://www.site.com/category1/subcategoryA1/product.html.

Otherwise, the URLs will be like http://www.site.com/product.html.

Categories/Products Sort Order specifies the way how the products are handled in the Sitemap. It can be either by Name (alphabetically) or By Position. The Position of the products is defined in the category settings. Go to PRODUCT ⟶ Inventory ⟶ Categories, select the desired category and go to the Products in Category tab.

Products by Position in Magento 2

If the Show CMS Pages setting is enabled, the sitemap will include the CMS pages on the Sitemap page.

The view of the CMS pages on the Sitemap page.

If the Show Additional Links setting is enabled, the extra field Additional Links appear below this setting. This field support the comma-delimited list of links and link labels like http://www.mageworx.com,MageWorx.

The way how the extra links are shown on the Sitemap page.

http:// is required in case the page is on some other website

Put the http:// before the URL. In case you put the www.mageworx.com,MageWorx, the link on the Sitemap page will lead to the http{s}://{your_current_store_URL_here}/www.mageworx.com



HTML Sitemap

If Allow Thirdparty Links setting is enabled, then the third-party extensions that are compartible to our extension will be able to add their pages (like blogs etc.) to the MageWorx Sitemap.

Next, the store owner can specify the Meta Title, Meta Description and Meta Keywords. This may be useful in case you have separate store views as the setting allows to provide different meta information per different store.

XML Sitemap

To tweak the general XML Sitemap settings, log into the Magento Admin panel and go to STORES ⟶ Configuration ⟶ MAGEWORX ⟶ SEO. The configuration of the extension is provided under the XML Sitemap tab.

HTML Sitemap

The Homepage Optimization feature allows to crop the identifier (like /home/) from the homepage URL and send its priority to the highest (1.0).

If the Enable Additional Links setting is enabled, the extra field Additional Links appear below this setting. This section is essential for the third-party extensions that generate some links (i.e. blog extensions, Store Locators or such).

The Frequency and Priority settings are provided for these extra links.

The Frequency setting adjusts the general information to search bots and may not correlate exactly to how often they really crawl these particular pages. This setting shows mostly how often the page is likely to change. The Always value means that the page content will differ each time they are accessed. The value Never is used for the archived URLs like some old blog posts or such. Please note that this is just the proposed value not the mandatory one and it’s always up to search bot to decide when these pages should be recrawled.

The Priority feature is designed to sort the pages on your store according to their importance. Please note that the priority of each page is set in relation to the other URLs on your Magento 2 website. Putting the high priority wouldn’t affect your site rankings and help them grow in search results pages. The priority is a relative value, so putting the highest priority on all the pages wouldn’t help.

Exclude "Out of Stock" setting excludes the products that are currently out of stock. Enable Validate URL should be disabled in case the URLs have the specific literal characters.

Common Settings For Sitemaps

The Common Section for Sitemaps allows to tweak the links in the sitemaps. To edit them, log into the Magento Admin panel and go to STORES ⟶ Configuration ⟶ MAGEWORX ⟶ SEO. The configuration of the extension is provided under the Common Section for Sitemaps tab.

Common Settings for Sitemap

These settings provide the possiblity to crop or add the Trailing slash for home page and for other URLs.

The trailing slash can be added only in case the page doesn't have the .htm or .html setting.

Individual Settings

Additionally, the store owner can tweak both HTML and XML sitemap settings for each product and category individually.

Categories

For the categories settings, go to PRODUCTS ⟶ Inventory ⟶ Categories, select the desired Category and open the Search Engine Optimization tab.

SEO Sitemap Category

If the Include In HTML Sitemap or Include In XML Sitemap are disabled, the category won't appear in HTML or XML sitemaps.

Products

For the products settings, go to PRODUCTS ⟶ Inventory ⟶ Catalog, select the desired Product and open the Search Engine Optimization tab.

SEO Sitemap Category

If the Include In HTML Sitemap or Include In XML Sitemap are disabled, the product won't appear in HTML or XML sitemaps.

CMS Pages

For the CMS pages settings, go to CONTENT ⟶ Elemets ⟶ Pages, select the desired CMS page and open the Search Engine Optimization tab.

SEO Sitemap Pages

If the Include In HTML Sitemap or Include In XML Sitemap are disabled, the CMS page won't appear in HTML or XML sitemaps.

Manage XML Sitemaps

To add and observe the sitemaps generated by means of our extension, go to MARKETING ⟶ SEO & Search ⟶ Sitemap by Mageworx.

SEO Sitemap

Please note that during the initial setup this grid will be empty.

The columns can be sorted alphabetically by clicking the column title.

The Sitemap can be generated by using the Generate link in the Action tab.

To create a new sitemap, click the Add Sitemap button.

SEO Sitemap

Magento 2 provides the built-in setup for the XML Sitemaps. They can be found in STORES ⟶ Configuration ⟶ CATALOG ⟶ XML Sitemap. The settings are described in our document. The Sitemaps generated by means of Sitemap Suite extension share the same settings.

Generating XML Via Console

It is possible to generate the sitemaps via console.

For this, via SSH, navigate to the root Magento folder and perform the command:

php bin/magento xmlsitemap:generate {id}

Here the {id} variable is the ID of the Sitemap. It can be found on the sitemap grid. Alternatively, to obtain the sitemap's ID it is possible to execute:

php bin/magento xmlsitemap:generate

without the ID. The list of the sitemaps will be shown with their corresponding IDs.

Got Questions?

MageWorx offers FREE lifetime support and updates for any extension developed for Magento. Need help with the extensions? Feel free submit a ticket from http://www.mageworx.com/support/ 



MageWorx offers outstanding services developing custom-tailored solutions for Magento platform to attain your eCommerce objectives. Our professional impassioned team provides profound and custom oriented development of your project in a short timeframe.