XML Sitemap Generator: Configuration
Settings of the XML Sitemap Generator for OXID eShop 7: output directory, content types, hreflang, filters, admin overview, included content and the robots.txt entry.
XML Sitemap Generator: Configuration
You find the settings in the OXID admin under Extensions > Modules > XML Sitemap Generator > Settings. Changes take effect with the next generation.
General settings
| Setting | Key | Default | Effect |
|---|---|---|---|
| Output Directory | sOutputDir |
export |
Directory for the sitemap files, relative to the shop's source/ directory |
| Max URLs per Sitemap | iMaxUrls |
50000 |
Currently not evaluated, see the note below |
With the default value the files end up in
source/export/and the sitemap URL is<shop URL>/export/sitemap.xml. With a different directory name, the URL changes accordingly.
Content types
| Setting | Key | Default |
|---|---|---|
| Include Products | blEnableProducts |
On |
| Include Categories | blEnableCategories |
On |
| Include CMS Pages | blEnableCmsPages |
On |
| Include Manufacturers | blEnableManufacturers |
On |
A disabled type is skipped during generation. Static URLs have their own switch, see below.
Features
| Setting | Key | Default | Effect |
|---|---|---|---|
| Enable Hreflang Tags | blHreflangEnabled |
Off | Adds alternate language URLs and x-default in multi-language shops |
| Enable Image Sitemap | blImagesEnabled |
On | Currently not evaluated, see the note below |
The settings "Max URLs per Sitemap" and "Enable Image Sitemap" are visible in the admin but have no effect. For products, categories, CMS pages and manufacturers, at most 50,000 URLs are always written per file (the static sitemap has no limit), and product images are always included.
Filters
| Setting | Key | Default | Effect |
|---|---|---|---|
| Exclude Variants | blExcludeVariants |
On | Only products without a parent product are included |
| Exclude Empty Categories | blExcludeEmptyCategories |
Off | Categories without active products are left out |
| Exclude CMS Snippets | blExcludeSnippets |
On | CMS entries of type snippet (for embedding only) are left out |
| Exclude Empty Manufacturers | blExcludeEmptyManufacturers |
Off | Manufacturers without active products are left out |
Static URLs
| Setting | Key | Default | Effect |
|---|---|---|---|
| Enable Static URLs | blEnableStaticUrls |
Off | Writes the entries of the Static URLs page to sitemap-static.xml |
Without this switch sitemap-static.xml is not created, even if entries exist. The Static URLs page describes how to manage the entries.
What is included
| Type | Included | File |
|---|---|---|
| Products | active, non-hidden products of the shop ID with an SEO URL in the respective language | sitemap-products.xml |
| Categories | active, non-hidden categories with an SEO URL | sitemap-categories.xml |
| CMS pages | active CMS entries with an SEO URL | sitemap-cms.xml |
| Manufacturers | active manufacturers with an SEO URL | sitemap-manufacturers.xml |
| Static URLs | active entries of the table mmd_sitemap_static_urls |
sitemap-static.xml |
Objects without an SEO URL in the respective language do not appear in the sitemap. Paginated SEO entries (pgNr=) are skipped.
Values per URL
| Type | changefreq |
priority |
|---|---|---|
| Products | weekly |
0.8 |
| Categories | weekly |
0.7 |
| CMS pages | monthly |
0.5 |
| Manufacturers | monthly |
0.6 |
| Static URLs | value of the entry, otherwise monthly |
value of the entry, otherwise 0.5 |
lastmod comes from the object's timestamp (oxtimestamp). If it is missing, the module uses today's date. These defaults cannot be changed in the admin.
Admin overview
The OXID admin has the main menu item Sitemap with the entries Overview and Static URLs. The overview offers:
- The button Generate Sitemap: runs
oe-console mmd:sitemap:generate -c -s <shop ID>directly, and the page waits for the result within the same request - The status with the number of static URLs of the shop
- The list of generated
sitemap*.xmlfiles with file name, size and modification date - The result of the last generation or the error message
The button needs the file
vendor/bin/oe-consolein the shop root (the directory abovesource/) and a PHP environment in whichexec()is allowed. Otherwise you see the message "Console command not found" or an error text from the console. In very large shops the generation can take longer than the web server's time limit, in which case the console command is the better choice.
robots.txt
Add the sitemap URL to your shop's robots.txt. With the default settings it is:
Sitemap: https://shop.example.com/export/sitemap.xml
The address is built from the shop URL (shop ID 1, the shop's URL field), the output directory and sitemap.xml. Open the address in a browser before you enter it. If that does not work, see Troubleshooting.