Configuration & Usage
Last updated
Was this helpful?
Last updated
Was this helpful?
First, create a new template that will contain the sitemap tag:.
The template can be anywhere, but usually a new sitemap.group
is created, and the {exp:sitemap:get}
tag is placed in the index
file. Note that the type is set to XML, not HTML. Regardless of where you locate the template you may need to define a route override. In the example above, visiting yoursite.com/sitemap
will render the sitemap, however, it does not have the .xml
extension, which is required by Google. You can create an template override by going to the Access tab when editing a template in the control panel. You will want to enter sitemap.xml
into the Template route override field.
Adding a template route override will make the template accessible at yoursite.com/sitemap
, and yoursite.com/sitemap.xml.
If duplicate content is a concern you may want to use an htaccess rewrite rule instead.
For each channel you can choose whether to include or exclude it from the sitemap, as well as define its url structure, change frequency and priority. The url structure supports the following tags which work the same as the associated channel entry tags:
If an entry is assigned to multiple categories then only the first category will be used in parsing.
The change frequency should indicate frequently the page is likely to change. This value provides general information to search engines but does not correlate exactly to how often they crawl the page.
The priority should indicate the priority of this channel’s entries relative to other channels on your site.
In addition to including URLs to channel entries you can also manually add individual urls. This allows you to add any pages on your site that do not have an associated channel entry.
Clicking Update Locations will not save any changes in the Channels table, and vice-versa, clicking Update Channels will not save any changes made in the Locations table. These two settings are independent of each other and this should be kept in mind when making updates.
Your sitemap template should only contain the following template tag. Ensure that there are no blank lines in your template as this can cause issues.
If your sitemaps are very large then you can define the start index and limit of the number of entries shown (Google’s limit is 50,000).
Older versions of Sitemap would automatically send an update to these endpoints when an entry was saved. Yahoo, Google, and Bing have all deprecated or completely disabled their sitemap submission end-points. For this reason Sitemap no longer supports this feature and it has been removed from the UI in current releases.
Google requires that you manually submit your sitemap location to them in order to allow the Sitemap Module to automatically ping them. You should submit the full url of your sitemap template. It only has to be submitted once and can be done from Google Webmaster Tools.
If any errors encountered when submitting a sitemap then you can use an XMLsitemap validator such as this one which will report the exact error and line number.