XML Sitemap Splitter for Magento 2
Introduction
The extension allows to generates and splits XML Sitemap into multiple sitemaps and help search engines to better understand and crawl your website.
Installation
The extension has 2 separate ways of installation, via Composer or by copying the code.
Please follow this Installation Guide to install the extension.
Configuration Settings
To access the XML Sitemap Splitter settings, log into the Magento Admin panel and go to STORES ⟶ Configuration ⟶ ULMOD EXTENSIONS ⟶ SEO XML Sitemap Splitter.
The module’s configuration contains nine sections.
General
In the General section the following settings are available :
Maximum Number of URLs per File - the maximum number of URLs that can be included in each sitemap. By default, the max URLs per file is 50000. Example: If 100 is entered and if :
- Categories: the total categories URLs in the store are 300, three separate categories sitemap are generated with 100 URLs per sitemap (Eg. 'filename_categories.xml, 'filename_categories_1.xml, filename_categories_2.xml')
- Products "In Stock": the total in-stock product URLs in the store are 300, three separate in-stock product sitemap are generated with 100 URLs per sitemap (Eg. 'products.xml, '_products_1.xml, _products_2.xml')
- Products "Out of Stock": the total out-of-stock product URLs are 300, three separate out-of-stock product sitemap are generated with 100 URLs per sitemap (Eg. 'products_outstock.xml, '_products_outstock_1.xml, _products_outstock_2.xml')
- Products Review: the total product review URLs are 300, three separate product review sitemap are generated with 100 URLs per sitemap ('products_review.xml, '_products_review_1.xml, _products_review_2.xml')
- CMS Pages: the total store CMS Pages URLs are 300, three separate CMS Page sitemap are generated with 100 URLs per sitemap (Eg. 'filename_cms.xml, 'filename_cms_1.xml, filename_cms_2.xml')
Check orphan products - set to "Yes", to check products that are not assigned or associated with any categories or, "No" to disable this functionality
Exclude URLs disallowed by robots.txt rules in the sitemap - if set to "Yes", URLs disallowed by robots.txt will be excluded in the sitemap.
Check products not included in the sitemap generation (Debug Mode Only) - set to "Yes" to check products that are not fetched or included during sitemap generation. Use this only for debug purpose as it may slow down your site
Categories
Enable - set to "Yes" to include categories pages in the sitemap. The category sitemap file will be suffixed by with '_categories' eg. http://mystore.com/sitemaps/nl/sitemap_categories.xml
Use last modified date? - If "Yes" the date when the page was last modified will be used else the current date will be used
Frequency - choose how frequently the content of the categories pages is likely to change: Always, Hourly, Daily, Weekly, Monthly, Yearly, Never
Priority - enters a value between 0.0 and 1.0. Zero has the lowest priority. This indicates the priority of categories URLs relative to other URLs on your site
Products "In Stock"
Enable - set to "Yes" to include "in stock" products pages in the sitemap. The product sitemap file will be suffixed by with '_products' eg. http://mystore.com/sitemaps/nl/sitemap_products.xml
Use last modified date? - If "Yes" the date when the page was last modified will be used else the current date will be used
Frequency - choose how frequently the content of the products pages is likely to change: Always, Hourly, Daily, Weekly, Monthly, Yearly, Never
Priority - enters a value between 0.0 and 1.0. Zero has the lowest priority. This indicates the priority of products URLs relative to other URLs on your site
Visibility - select the visibility of the in-stock products to includes on sitemap: Catalog; Search; Catalog, Search
Products "Out Stock"
Enable - set to "Yes" to include "out of stock" products pages in the sitemap. The out of stock product sitemap file will be suffixed by with '_products_outstock' eg. http://mystore.com/sitemaps/nl/sitemap_products_outstock.xml
Use last modified date? - If "Yes" the date when the page was last modified will be used else the current date will be used
Frequency - choose how frequently the out-of-stock products pages content is likely to change: Always, Hourly, Daily, Weekly, Monthly, Yearly, Never
Priority - enters a value between 0.0 and 1.0. Zero has the lowest priority. This indicates the priority of out-of-stock products URLs relative to other URLs on your site
Products Image
Note:
- this feature works with sitemap type: Basic with Image only. Before using this feature, make sure that your sitemap type ( Marketing ⟶ SEO XML Sitemap Splitter by Ulmod ⟶ Sitemap(s). ⟶ select sitemap ⟶ Type ) is set to Basic with Image
- please re-generate the sitemap any time you change on Add product image into product sitemap feature, and make sure to refresh your broswers before checking the generated sitemap(s)
Add product image into product sitemap - choose to include/exclude product images into the product sitemap:
- No - exclude product images into the product sitemap;
- Yes - includes product images into the product sitemap;
Show product image title (Optional) - if set to "Yes" the title of the image (product image alt text) will be included on the sitemap
Show product image caption (optional) - if set to "Yes" the caption of the image (product short description) will be included on the sitemap
Show product image license (Optional) - if set to "Yes" the custom image license will be included in the sitemap
Custom product image license - specifies the custom image license to include on the sitemap. eg: https://creativecommons.org/licenses/by/4.0/legalcode
Products Review
Enable - if set to "Yes", products review will be included in the sitemap. The product review sitemap file will be suffixed by with '_products_review' eg. http://mystore.com/sitemaps/nl/sitemap_products_review.xml. Note: reviews from products with visibility set under STORES → Configuration → ULMOD EXTENSIONS → SEO Xml Sitemap Splitter → Products "In Stock" → Visibility field, will be included on the sitemap
Frequency - choose how frequently the content of the reviews pages is likely to change: Always, Hourly, Daily, Weekly, Monthly, Yearly, Never
Priority - enters a value between 0.0 and 1.0. Zero has the lowest priority. This indicates the priority of products review URLs relative to other URLs on your site
CMS Pages
Enable - set to "Yes", to include CMS pages in the sitemap. The CMS Pages sitemap file will be suffixed by with '_cms' eg. http://mystore.com/sitemaps/nl/sitemap_cms.xml
Use last modified date? - If "Yes" the date when the page was last modified will be used else the current date will be used
Frequency - choose how frequently the content of the CMS pages is likely to change: Always, Hourly, Daily, Weekly, Monthly, Yearly, Never
Priority - enters a value between 0.0 and 1.0. Zero has the lowest priority. This indicates the priority of CMS pages URLs relative to other URLs on your site
Exclude pages - select the CMS pages to exclude in the sitemap
Generation
Enable - set to "Yes", the XML sitemap(s) will get generated automatically at the specified time
Frequency choose how frequently you would like to automatically generate the XML sitemap(s): Daily (Once in day), Weekly (Once in week), Monthly (Once in month)
Start time - choose the time to auto-generate the sitemap
Enable report notification - if 'Yes', the sitemap notification by email is enabled
Email report recipient - enter the email address(es) of the person(s) who is to receive the sitemap generation report. If more than one email, please separate them by a semicolon (;). Example: [email protected];[email protected]
The generated sitemap report will be emailed to any recipient(s) specified, every time the scheduled job generates a new sitemap, or if the sitemap is generated via the command line (CLI).
Email report sender - selects the sender of the email notification
Search Engine
Search engine to ping/submit sitemap - select the search engine(s) to ping/submit your sitemap. Default: Google. If empty, the previously selected search engine will be set. To ping/submit your sitemap to the selected search engines, please go to : MARKETING → SEO XML Sitemap Splitter by Ulmod → Sitemap(s) , on Action column, select the "Submit Sitemap" option.
Manage Sitemap(s)
To manage the sitemaps, please go to Marketing ⟶ SEO XML Sitemap Splitter by Ulmod ⟶ Sitemap(s).
On this convenient grid, you can manage all sitemaps:
- Submit Sitemap to submit/ping the sitemap to the configured search engine
- Generate Sitemap to generate the sitemap
- Delete Sitemap to delete the sitemap
to add a new sitemap, click the ‘Add Sitemap’. There you can configure the sitemap:
Filename: - enter the filename of the sitemap. Example: sitemap.xml
Path: enter the path where the sitenap will be generated:
- If you use pub as the document root of your Magento 2 installation:
- create a folder where the site map will be generated under pub/media/ directory. Example: if your pub directory is: /var/www/html/magento2/pub , create sitemaps folder under /var/www/html/magento2/media make sure that it is writeable and enter pub/media/sitemaps/ in the Path field. - If you use the default web root as the document root of your Magento 2 installation:
- create the folder where the site map will be generated under your default web root. Example: if your default web root is: /var/www/html/magento2 , create sitemaps folder under /var/www/html/magento2 , make sure that it is writeable and enter sitemaps/ in the Path field. Do not use app, bin. dev, generated, lib, phpserver, setup, update, var and vendor folders
Type: select the sitemap type to generate:
- Basic: The default sitemap, compatible with the major search engine. eg. Google, Bing etc. More details here;
- Basic with Image: The default sitemap including images, compatible with Google only. More details here. Please make sure to set "Add images into sitemap" field under STORES ⟶ Configuration ⟶ ULMOD EXTENSIONS ⟶ SEO XML Sitemap Splitter ⟶ Products Image section to Yes, to includes product images to the sitemap ;
- Mobile: The mobile sitemap, compatible with Google only. More details here;
Store View: - Choose the store view to which you want to generate the sitemap
Click "Save" button to save the sitemap. To save and generate the sitemap, click "Save & Generate", the sitemap will be generated and split. A summary of the successfully generated sitemap appear at the grid
Command Line(CLI) Sitemap(s) Generation
List command:
php bin/magento
There you will see all available xml sitemap splitter command under ulmod section
To list all available CLI sitemap generate & split options, run the command:
php bin/magento ulmod:xmlsitemapsplitter:generate --help
To generate & split a single sitemap, eg. sitemap with id 13, run the command:
php bin/magento ulmod:xmlsitemapsplitter:generate --id 13
To generate & split two specific sitemaps, eg. sitemap with ids 13 and 15, run the command:
php bin/magento ulmod:xmlsitemapsplitter:generate --id 13,15
To generate & split all available sitemaps, run the command:
php bin/magento ulmod:xmlsitemapsplitter:generate
Generated XML Sitemap(s) Files
To access the generated sitemap(s) from the admin, click on each generated sitemap link from the admin grid
Example of sitemap index that includes all sitemaps
Example of sitemap for CMS pages
Example of sitemap for product reviews
Example of sitemap for categories pages
Example of sitemap for in-stock product pages
Example of sitemap for out-of-stock product pages
Extension Support
Need Help?
Ulmod Support team is always ready to assist you, no matter which part of the world you are in. If something does happen and you think you might be experiencing an issue or bug, please contact us via [email protected] or submit a ticket from our Helpdesk Ticket and we will help you out.
Got Questions?
Should you have any questions or feature suggestions, please Contact Us. Your feedback is welcome!