Sitemaps allow you to inform search engines about pages on your website that are available for crawling. A sitemap is an XML file that lists URLs within your site, as well as additional information about each URL such as when it was last updated, how often its content changes and its priority within the site. The purpose of this is to help search engines to more intelligently crawl your website, with the ultimate aim of improving your SEO and pagerank.

Note that this add-on creates XML sitemaps and not HTML sitemaps, for your front-end site. Find out more about sitemaps at sitemaps.org.

The Sitemap Module allows you to select which channels to include in the sitemap and to set preferences for each channel - its URL structure, change frequency and priority. You can also add individual URLs to the sitemap and set their preferences.

Requirements

The Sitemap Module works with ExpressionEngine version 2.10.0 or above, 3.1.0 or above, and 4.0.0 or above.

For ExpressionEngine 2 and 3, you must download and use the legacy version of the add-on from the main add-on page on devot-ee.

Installation

Download and unzip the Sitemap Module, then follow the steps below.

  1. Upload the _sitemap _folder to your add-on directory
  2. Install the Sitemap Module
  3. Create a template called sitemap of type XML and place the following line in it (nothing else):

     {exp:sitemap:get}
    
  4. Open the Sitemap Module settings page and set your preferences

  5. Use the links to submit your sitemap manually to Google

Updating

Download and unzip the latest version of the Sitemap Module, then overwrite all files.

Module Preferences

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:

{url_title}
{page_uri}
{page_url}
{entry_id}
{weblog_id}
{cat_id}
{cat_name}
{cat\_url\_title}
{entry_date}
{entry_date format="%Y/%m/%d"}     // supported in EE2.8.0 and above

Note: 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.

Sitemap Module

For each channel that you include in the sitemap a Sitemap tab will appear when publishing or editing an entry, allowing you to select whether or not to notify seach engines that your content has changed. The checkbox is checked by default only when publishing a new entry. The search engines that are currently supported are Google, Bing and Ask. Yahoo recently removed its sitemap ping service so has been removed from the add-on.

Sitemap Module

Template Tags

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.

{exp:sitemap:get}

Outputs the full xml sitemap.

{exp:sitemap:get}

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).

{exp:sitemap:get start="0" limit="10000"}

Notifying Search Engines

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.

FAQ

What are the benefits of using a sitemap?
The main benefits of using a sitemap are that search engines will include a higher proportion of your pages in their index and that you can notify them of changes to your content. Another big benefit is that you can use Google Webmaster tools to get reports of potential crawling problems such as broken links (404 errors) or crawling problems.

Will using the Sitemap Module significantly improve the SEO of my site?
In general yes, however the results vary from site to site. One of the reviewers on devot-ee had this to say about the Sitemap Module:
"This is a must have for all EE websites we build. It is easy to set up and results are seen quite quickly."

What url should I submit to search engines?
You should submit the full url to your sitemap template. You can easily get to it by clicking on the View Rendered Sitemap link in the Sitemap Module page.

Can I use the Sitemap Module to generate a front-end sitemap of my site?
No, the Sitemap Module is for SEO purposes and only creates an XML sitemap that is readable by search engines.

I am seeing PHP errors when viewing the sitemap
Updating your channels in the Sitemap Module should fix this.

Support

Get support by creating a new issue here.