Sitemap Module

Creates a dynamic XML sitemap of your entire site.

The Sitemap Mod­ule auto­mat­ic­ally gen­er­ates a con­fig­ur­able xml sitemap of your web­site that helps search engine crawl­ers to index your site.

Sitemaps allow you to inform search engines about pages on your web­site that are avail­able for crawl­ing. A sitemap is an XML file that lists URLs with­in your site, as well as addi­tion­al inform­a­tion about each URL such as when it was last updated, how often its con­tent changes and its pri­or­ity with­in the site. The pur­pose of this is to help search engines to more intel­li­gently crawl your web­site, with the ulti­mate aim of improv­ing your SEO and pagerank.

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

The Sitemap Mod­ule allows you to select which chan­nels to include in the sitemap and to set pref­er­ences for each chan­nel — its URL struc­ture, change fre­quency and pri­or­ity. You can also add indi­vidu­al URLs to the sitemap and set their preferences.

Require­ments #

The Sitemap Mod­ule works with Expres­sion­En­gine ver­sion 2.10.0 or above, 3.1.0 or above, 4.0.0 or above and 5.0.0 and above.

For Expres­sion­En­gine 2 and 3, you must down­load and use the leg­acy ver­sion of the add-on from the main add-on page on devot-ee.

Install­a­tion #

Down­load and unzip the Sitemap Mod­ule, then fol­low the steps below.

  1. Upload the sitemap folder to your add-on directory
  2. Install the Sitemap Module
  3. Cre­ate a tem­plate called sitemap of type XML and place the fol­low­ing line in it (noth­ing else):
  1. Open the Sitemap Mod­ule set­tings page and set your preferences
  2. Use the links to sub­mit your sitemap manu­ally to Google

Updat­ing #

Down­load and unzip the latest ver­sion of the Sitemap Mod­ule, then over­write all files.

Mod­ule Pref­er­ences #

For each chan­nel you can choose wheth­er to include or exclude it from the sitemap, as well as define its url struc­ture, change fre­quency and pri­or­ity. The url struc­ture sup­ports the fol­low­ing tags which work the same as the asso­ci­ated chan­nel entry tags:

{entry_date format="%Y/%m/%d"} // sup­por­ted in EE2.8.0 and above

Note that if an entry is assigned to mul­tiple cat­egor­ies then only the first cat­egory will be used in parsing.

The change fre­quency should indic­ate fre­quently the page is likely to change. This value provides gen­er­al inform­a­tion to search engines but does not cor­rel­ate exactly to how often they crawl the page.

The pri­or­ity should indic­ate the pri­or­ity of this channel’s entries rel­at­ive to oth­er chan­nels on your site.

In addi­tion to includ­ing URLs to chan­nel entries you can also manu­ally add indi­vidu­al urls. This allows you to add any pages on your site that do not have an asso­ci­ated chan­nel entry.

Sitemap Module

For each chan­nel that you include in the sitemap a Sitemap tab will appear when pub­lish­ing or edit­ing an entry, allow­ing you to select wheth­er or not to noti­fy seach engines that your con­tent has changed. The check­box is checked by default only when pub­lish­ing a new entry. The search engines that are cur­rently sup­por­ted are Google, Bing and Ask. Yahoo recently removed its sitemap ping ser­vice so has been removed from the add-on.

Sitemap Module

Tem­plate Tags #

Your sitemap tem­plate should only con­tain the fol­low­ing tem­plate tag. Ensure that there are no blank lines in your tem­plate as this can cause issues.


Out­puts the full xml sitemap.


If your sitemaps are very large then you can define the start index and lim­it of the num­ber of entries shown (Google’s lim­it is 50,000).

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

Noti­fy­ing Search Engines #

Google requires that you manu­ally sub­mit your sitemap loc­a­tion to them in order to allow the Sitemap Mod­ule to auto­mat­ic­ally ping them. You should sub­mit the full url of your sitemap tem­plate. It only has to be sub­mit­ted once and can be done from Google Web­mas­ter Tools.

Troubleshoot­ing #

If any errors encountered when sub­mit­ting a sitemap then you can use an XML sitemap val­id­at­or such as this one which will report the exact error and line number.


What are the bene­fits of using a sitemap?

The main bene­fits of using a sitemap are that search engines will include a high­er pro­por­tion of your pages in their index and that you can noti­fy them of changes to your con­tent. Anoth­er big bene­fit is that you can use Google Web­mas­ter tools to get reports of poten­tial crawl­ing prob­lems such as broken links (404 errors) or crawl­ing problems.

Will using the Sitemap Mod­ule sig­ni­fic­antly improve the SEO of my site?

In gen­er­al yes, how­ever the res­ults vary from site to site. One of the review­ers on devot-ee had this to say about the Sitemap Module:
This is a must have for all EE web­sites we build. It is easy to set up and res­ults are seen quite quickly.”

What url should I sub­mit to search engines?

You should sub­mit the full url to your sitemap tem­plate. You can eas­ily get to it by click­ing on the View Rendered Sitemap link in the Sitemap Mod­ule page.

Can I use the Sitemap Mod­ule to gen­er­ate a front-end sitemap of my site?

No, the Sitemap Mod­ule is for SEO pur­poses and only cre­ates an XML sitemap that is read­able by search engines.

I am see­ing PHP errors when view­ing the sitemap

Updat­ing your chan­nels in the Sitemap Mod­ule should fix this.

Changelog #

Ver­sion 4.0.0 #
  • Made com­pat­ible with Expres­sion­En­gine 4
Ver­sion 3.0.1 #
  • Made com­pat­ible with PHP 7.0.0
Ver­sion 3.0.0 #
  • Made com­pat­ible with Expres­sion­En­gine 3
End of fea­ture devel­op­ment for EE2 ver­sion #
Ver­sion 2.6.6 #
  • Parse date vari­ables only sup­por­ted for EE2.8.0 and above
Ver­sion 2.6.5 #
  • Added the abil­ity to format the entry date tag
Ver­sion 2.6.4 #
  • Fixed bug with MySQL strict mode
Ver­sion 2.6.3 #
  • Added com­pat­ib­il­ity for EE 2.7.0
Ver­sion 2.6.2 #
  • Removed Ask​.com from sitemap pinger
Ver­sion 2.6.1 #
  • Fixed deprec­ated code in EE 2.6.0
Ver­sion 2.6 #
  • Chan­nels are excluded by default
  • Bug­fix for sites using MSM
Ver­sion 2.5.2 #
  • Bug­fix for exten­sion in new ver­sions of PHP
Ver­sion 2.5.1 #
  • Bug­fix for when chan­nel has no assigned Status Group
Ver­sion 2.5 #
  • Added mul­tiple status selec­tion per channel
Ver­sion 2.4.1 #
  • Bug­fix for when Pages and Struc­ture mod­ules not installed
Ver­sion 2.4 #
  • Added sup­port for Pages and Struc­ture with {page_​uri} and {page_​url} tags
End of fea­ture devel­op­ment for EE1 ver­sion #
Ver­sion 2.3.2 #
  • Removed Yahoo from Sitemap pinger exten­sion since the ser­vice is no longer available
Ver­sion 2.3.1 #
  • Minor bug­fixes
Ver­sion 2.3 #
  • Removed the need for a sitemap.php file
  • Improved sta­bil­ity of the View Rendered Sitemap link
  • Sitemap tab now always appears on pub­lish page in order to work­around pub­lish page bug (EE2)
Ver­sion 2.2.1 #
  • Sitemap tab bug­fix on pub­lish page (EE2)
Ver­sion 2.2 #
  • Added Sitemap tab on pub­lish page (EE2)
  • Fixed preg_​match error bug
Ver­sion 2.1.3 #
  • Fixed bug that affected older ver­sions of MySql
Ver­sion 2.1.2 #
  • Updated to work with latest EE2 version
Ver­sion 2.1.1 #
  • Fixed bug in View Rendered Sitemap link in EE2 version
Ver­sion 2.1 #
  • Added sitemap pinger to EE 2.x version
Ver­sion 2.0.2 #
  • Fixed bug that was caus­ing php errors in EE2
Ver­sion 2.0.1 #
  • Added iso8601 date sup­port for PHP4
Ver­sion 2.0 #
  • Con­ver­ted to an EE 2.x com­pat­ible mod­ule (both ver­sions avail­able in download)
Ver­sion 1.6.7 #
  • Added time to last­mod field in sitemap
  • Entries with future entry dates now excluded in sitemap
Ver­sion 1.6.6 #
  • Added {entry_​date} vari­able in location
Ver­sion 1.6.5 #
  • Replaced Live​.com with Bing​.com in sitemap pinger
Ver­sion 1.6.4 #
  • Fixed a bug caused by last update in which entries were shown mul­tiple times if they were assigned to mul­tiple categories
Ver­sion 1.6.3 #
  • Added lim­it field to sql query
  • Fixed update web­logs bug caused by last update
Ver­sion 1.6.2 #
  • Added abil­ity to change set­tings for site index page
  • Added link to show/​hide excluded loc­a­tions and web­logs (thanks to Todd for the suggestion)
Ver­sion 1.6.1 #
  • Added option for start and lim­it para­met­ers to urls
Ver­sion 1.6 #
  • Added vari­able parsing
Ver­sion 1.5 #
  • Added start and lim­it para­met­ers to allow for mul­tiple sitemaps
  • Added func­tion­al­ity to pre­vent expired entries from appear­ing in sitemap
  • Optim­ised sql quer­ies and reduced php memory requirements
Ver­sion 1.4.2 #
  • Fixed a bug that was caus­ing prob­lems when check­ing for updates
Ver­sion 1.4.1 #
  • Per­forms checks on the edit date to ensure last­mod is format­ted cor­rectly and fixes bad dates
Ver­sion 1.4 #
  • Replaced tem­plate drop­down box with url input box
  • Loc­a­tions are now spe­cif­ic to indi­vidu­al sites (MSM compatible)
  • Added con­firm­a­tion box when delet­ing locations
  • Sitemap pinger now ignores web­logs that are excluded from the sitemap
  • Fixed a bug that was cre­at­ing the link to the rendered sitemap with a miss­ing slash
  • Fixed a bug that was caus­ing prob­lems on some serv­ers when installing the module
Ver­sion 1.3 #
  • More tem­plate options added to tem­plate selec­tion list
  • Changed nam­ing of status options for clarity
  • Added a check to pre­vent ses­sions from being star­ted more than once
  • Fixed a bug that was caus­ing the tab body of oth­er exten­sions to be overridden
  • Fixed a bug that was caus­ing the first tem­plate of each group to not appear in tem­plate selec­tion list
Ver­sion 1.2 #
  • Fixed a bug that was caus­ing double slashes to be added after site url in some cases
  • Fixed a bug that was caus­ing tabs put on the pub­lish page by oth­er exten­sions to be over­rid­den (thanks to Leevi Graham)
Ver­sion 1.1 #
  • Sitemap tab added to the pub­lish and edit pages in the con­trol pan­el, allow­ing you to select wheth­er or not to send a sitemap ping to search engines
  • Tem­plate group names added to tem­plate selec­tion list (thanks to Vic­tor Guti­er­rez for the suggestion)
  • Fixed a bug in the exten­sion that was caus­ing errors when entries were being sub­mit­ted from stand-alone entry forms
Ver­sion 1.0 #
  • Ini­tial release