Magnolia 5.7 reached extended end of life on May 31, 2022. Support for this branch is limited, see End-of-life policy. Please note that to cover the extra maintenance effort, this EEoL period is a paid extension in the life of the branch. Customers who opt for the extended maintenance will need a new license key to run future versions of Magnolia 5.7. If you have any questions or to subscribe to the extended maintenance, please get in touch with your local contact at Magnolia.
The Google Sitemap app is installed by the Google Sitemap module.
This module is going to be deprecated soon due to issues affecting its functionality. We recommend that you create a sitemap from a Solr index as an alternative.
Note that using Google Sitemaps does not guarantee that all links will be crawled, and even crawling does not guarantee indexing. Nevertheless, a Google Sitemap is still the best insurance for visibility in search engines. Webmasters can include additional information about each URL, such as when it was last updated, how often it changes, and how important it is in relation to other URLs in the site. Google Sitemaps adhere to the Sitemaps protocol and are ready to be submitted to search engines.
The Google Sitemap app is installed by the Google Sitemap module . The app is based on the content app framework so its configuration is typical of any content app. The app is configured at
The Google Sitemap app operates on the
googleSitemaps workspace that stores the sitemaps.
The Google Sitemap module registers a custom
mgnl:siteMap node type. The Google Sitemap app operates on nodes of this type and on folders.
Creating a sitemap
Sitemaps are created in the Google Sitemaps app.
To create a new sitemap,
- Click Add sitemap. You can arrange your sitemaps in folders if you like.
- Site Map Properties:
- Name: The internal name of the sitemap. It is used in the URL that renders the sitemap. See Viewing the site map.
- URI: Optional. Virtual URI that redirects visitors to the actual sitemap page. Useful for shortening a long URI.
- Include virtual URIs: Select to include any defined virtual URIs. Virtual URI mappings are a Magnolia method of redirecting requests and shortening URLs. The apps reads all virtual URI mappings from the system and lists them in the Virtual URIs subapp.
- Site map type: Two sitemap types are available,
Feature Phone. Google recommends that you use separate sitemaps for different content types. Feature phone sitemaps use compliant mobile-specific tag and namespace requirements.
- Site Selection:
Sites: Select the relevant site in the Pages chooser. You can also select subpages as the root node to, for example, create different sitemaps for site sections.
The root node of the selection will not be included in the site map. Assume you have the following trees:
/a/b/d. If you select
/a/bas the root of the sitemap, only pages under
dwill be included in the map. The root node
bwill not be included.
Sitemap links are generated using the protocol that is defined in your site definition. The default protocol is HTTP. If you want HTTPS define the protocol in domain mapping.
- Default Value Selection:
- Change frequency: Select the default value of Change frequency to use in the current site map.
- Priority: Select the default priority value to use in the current site map.
The default values displayed in the Default Values Selection tab are configured in
Editing sitemap entries
To edit the individual sitemap entries click Edit site map entries. The site pages display in an expandable tree and you can set properties for each page.
To define properties for the entries click Edit entry properties:
- Priority: Priority of the page relative to other pages on the site. Values range from 0.0 (low) to 1.0 (high). Default is 0.5. Set the priority of your most important page to 1.0. Setting all pages to 1.0 does not increase the rank of your site in search results since the importance is a relative measure among pages of the same site. A search engine may choose to rank the page higher than other pages of the site based on the value, however. See
priorityin XML Sitemap protocol.
- Change frequency: Suggested frequency for search engines to crawl the page. Valid values are:
never. Use the value
alwaysfor pages that change each time they are accessed. Use
neverfor archived pages that will never change. See
changefreqin XML Sitemap protocol.
- Hide: Excludes a page from the sitemap. Child pages are not excluded automatically. The
hideIngoogleSiteMapproperty is stored in the page itself. This means you need to activate the page. Publishing the sitemap only is not enough.
- Hide children: Excludes child pages from the sitemap. To exclude both a parent and its children check both boxes.
Editing virtual URI entries
If you included virtual URIs in the sitemap you can edit their properties. Click Edit virtual URI entries to open the Virtual URIs subapp. The pages display as individual entries (as opposed to a tree) and you can set the same properties that are available for pages, except Hide children that is inapplicable.
Hide default mappings defined in the
ui-admincentral module, such as those for accessing AdminCentral. Public users will not access AdminCentral, so these URLs do not need to appear in the sitemap. Also, hide mappings that use regular expressions in the
toURI property. These are not understood by search engines as regular expressions.
Publish the sitemap to the public instance to ensure that it is accessible to the search engines.
Viewing the sitemap
You can view the XML sitemap on the author or public instance at
/<CATALINA_HOME>/<contextPath>/sitemaps/<sitemap name>.xml , for example,
. Note that a filter mechanism removes duplicate urls.
Exporting the sitemap
The Export option in the Action bar of the Google Sitemap app will export the sitemap itself (a
<urlset>) named as
<sitemap name>.xml . The JCR configuration for such a sitemap can be exported from the JCR Tools app, in which case the XML file will be named as
googleSitemaps.< sitemap name >.xml .
siteMapsConfiguration page template renders the sitemap.
The definition is configured in
SiteMapModel is the main model class for site map templates.
Virtual URI mapping
The virtual URI mapping configuration is in
/modules/google-sitemap/virtualURImapping/sitemaps . For details see the configuration at the virtual URI mapping page.
Adding to robots.txt file
Add the following line in your
robots.txt file. Include the full URL to the sitemap:
Submitting to search engines
Submit the sitemap to major search engines via the webmaster tools of each engine or wait for the engines to find the sitemap on their own.
Everything that can be changed in the section Editingsitemapentries will be written to the corresponding website node. So after you edited an entry, you need to publish the corresponding website node. The current documentation makes it seem like that only applies to the
hide-property. It applies to all the properties. There should be a much bigger, marked disclaimer right at the beginning of the section.