Magnolia 5.5 reached end of life on November 15, 2019. This branch is no longer supported, see End-of-life policy.
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.
The Google Sitemap app creates an XML sitemap file that lists URLs for each page. Sitemaps are used to tell search engines which pages they should index. This improves search engine optimization (SEO) by ensuring that all site pages are found and indexed. This is particularly important for sites that use dynamic access to content such as Adobe Flash and for sites that have JavaScript menus that do not include HTML links. Where navigation is built with Flash, a search engine will probably find the site homepage automatically, but may not find subsequent pages unless they are provided in a Google Sitemap format.
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 /modules/google-sitemap/apps/siteMaps
.
Node name |
---|
modules |
google-sitemaps |
apps |
siteMaps |
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.
Sitemaps are created in the Google Sitemaps app.
To create a new sitemap,
Standard
and Feature Phone
. Google recommends that you use separate sitemaps for different content types. Feature phone sitemaps use compliant mobile-specific tag and namespace requirements. 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/c
and /a/b/d
. If you select /a/b
as the root of the sitemap, only pages under c
and d
will be included in the map. The root node b
will 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.
The default values displayed in the Default Values Selection tab are configured in /modules/google-sitemap/config
.
Node name | Value |
---|---|
modules | |
google-sitemap | |
config | |
changeFrequency | weekly |
priority | 0.5 |
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
in XML Sitemap protocol.always
, hourly
, daily
, weekly
, monthly
, yearly
and never
. Use the value always
for pages that change each time they are accessed. Use never
for archived pages that will never change. See changefreq
in XML Sitemap protocol.hideIngoogleSiteMap
property is stored in the page itself. This means you need to activate the page. Publishing the sitemap only is not enough.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.
You can view the XML sitemap on the author or public instance at /<CATALINA_HOME>/<contextPath>/sitemaps/<sitemap name>.xml
, for example,
http://localhost:8080/magnoliaPublic/sitemaps/standard-google-sitemap.xml
. Note that a filter mechanism removes duplicate urls.
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
.
The siteMapsConfiguration
page template renders the sitemap.
The definition is configured in /modules/google-sitemaps/templates/pages/siteMapsConfiguration
:
Node name | Value |
---|---|
google-sitemaps | |
templates | |
pages | |
siteMapsConfiguration | |
i18nBasename | info.magnolia.module.googlesitemap.messages |
modelClass | info.magnolia.module.googlesitemap.model.SiteMapModel |
name | GoogleSiteMap |
renderType | freemarker |
templateScript | /sitemap/pages/main.ftl |
title | GoogleSiteMap |
visible | false |
Properties
siteMapsConfiguration | |
| SiteMapModel is the main model class for site map templates. |
| main.flt (GIT) includes two alternative scripts, mainXml.ftl (GIT) and mainConfiguration.ftl (GIT) that renders Text or XML content dependent on the URL extension. |
The virtual URI mapping configuration is in /modules/google-sitemap/virtualURImapping/sitemaps
. For details see the configuration at the virtual URI mapping page.
Add the following line in your robots.txt
file. Include the full URL to the sitemap:
Sitemap: http://www.example.com/sitemap.xml
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.