Magnolia 4.5 reached end of life on June 30, 2016. This branch is no longer supported, see End-of-life policy.
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.
See the general module uninstalling instructions and advice.
The Google Sitemap module is configured in
To create a sitemap:
mobile. Google recommends that you use separate sitemaps for different content types. Mobile sitemaps use compliant mobile-specific tag and namespace requirements.
dialogproperty to the Sitemap template if the dialog does not open. For earlier versions see below.
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/b as the root of the sitemap, only pages under
d will be included in the map. The root node
b will not be included.
For versions up to 4.5.13, the Google sitemap page does not have a properties dialog and mobile sitemaps are not supported. To exclude the sitemap page from site navigation, the options are:
dialogproperty in the
siteMapsConfigurationtemplate definition. Set the value to the generic
standard-templating-kit:generic/master/basePagePropertiesdialog. Then open the dialog and check the Hide in navigation box.
hideInNavproperty under the sitemap page node and set it to
To define properties for the entries click Edit properties:
priorityin XML Sitemap protocol.
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.
hideIngoogleSiteMapproperty is stored in the page itself. This means you need to activate the page. Activating the sitemap only is not enough.
To include virtual URIs in your sitemap, add the VirtualUriComponent to the page. No dialog is associated with this component. The component directly renders virtual URIs defined in this instance. are a Magnolia method of redirecting requests and shortening URLs. The Google Sitemap module reads all virtual URI mappings from the system and lists them here. Set properties as required. The entries display as list (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 adminInterface 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.
Activate the sitemap page to the public instance to ensure that it is accessible to the search engines. You also need to activate any pages you excluded from the sitemap.
You can view the XML sitemap on the author or public instance at
/<CATALINA_HOME>/<contextPath>/<sitemap name>.xml, for example,
. Note that a filter mechanism removes duplicate URLs.
Here's the rendered XML for a
mobile sitemap for the
demo-project site. Note the use of the
siteMapsConfiguration page template renders the sitemap. The configuration is at
modelClass: SiteMapModel is the main model class for site map templates.
includestwo alternative scripts,
mainConfiguration.ftl(GIT) that renders text or XML content dependent on the URL extension.
dialog: Add this property and set the value to
Add the following line in your
robots.txt file. Include the full URL to the sitemap:
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.