Feb 24, 2009

Another Google sitemap TYPO3 extension

Today morning I sent a Google map extension to the TYPO3 extension repository. I had it for some time already on this and some other sites of mine.
Sitemaps help Google to index your site better and faster. There are only advantages of having them in the TYPO3 web sites.
There several extensions that implement such functionality. Why yet another extension? Here is why:
  • it correctly works with config.baseURL, config.absRefPrefix and domain records. Every other extension does not work with at least one of these settings and creates URLs with host name prepended twice to the URL (invalid URL in the sitemap!)
  • none of the existing extension currently create news sitemap correctly
  • all existing extensions are implements as normal plugins and thus do not perform well enough
My extension is better because it:
  • correctly creates URLs
  • adds a date of last page modification
  • calculates page change frequency based on history of page updates
  • creates news URL correctly
  • uses eID feature, which offers much less load on the server

Why didn't I modify some other extension? I tried. Some of those extensions are either to complex in coding (unnecessarily complex!) or the logic is fundamentally flawed. It was much easier to create a new extension from scratch.

Using the extension

Using the extension is quite simple. In Google Webmaster tools add a sitemap with the URL like this: http://example.com/?eID=dd_googlesitemap. That's it. Nothing else to do. For news sitemap you need to supply two more parameters, which described in the extension manual.
News sitemap currently assumes that news items have only one "single" page. So if your news items have different single pages for each category, they have to be in separate sysfolders and submitted through separate site maps. This will be changed soon.

Found a problem?

The extension is hosted on Forge. Please, add bugs to the Forge's bug tracker.


  1. Thanks for sharing this, will have a look when I get some time. Not too happy with the other Google sitemap extensions at all.

  2. Thanks Dmitry,

    I'll give it a try in the next few days. I have been using mcgooglesitemap for some time and had no problems generating sitemaps for news items (one "page" per news entry). Also no problems in combination with realurl.

    On some systems however the root page would have an invalid address of just '/', which I patched in the source code for these cases.

    I really like the idea of (almost) zero configuration though!

  3. I have installed this extension. Very good. I like it. Just works like a charm. Really good.

  4. Thanks for that cool extension! I like the eId approach :-)

  5. Thanks to everyone for positive responses :)

    I got several e-mails with questions and suggestions. I ask to post questions to mailing lists or here. This will provide helpful information to everyone, not just to the person who asked.

    Issues should go to the bug tracker:


    I will have to post all mailed issues to bug tracker anyway. So let's save time and e-mail traffic and post issue there directly ;)

  6. Installed, all work ok. Great extension, thanks a lot Dmistry ;)

  7. It worked right after installation.

    I had to change some things to make it fit my needs (blog at http://www.t3node.com/ using tt_news + timtab + vge_guestbook):

    - use namespace for regular pages instead of news. (I don't like to see my blog postings in google news search but in regular search.

    - set to latest guestbook comment date. (any comment changes the page content. Now this gets refleted in which triggers google to reindex the blog posting with new comment)

    See: http://www.t3node.com/sitemap.xml

    Anyway, thanks a lot for contributing.

  8. Can I ask how you got eID and realURL working together? I'm making an eID extension and the links it produces are in the format www.domain.com/index.php?id=1234. Ideally I need those to be the proper realURL's so our web tracking keeps an eye on what people are clicking with full URL's and no the id URL's.

  9. It seems like it doesn't support multiple language website. It only lists the pages from the default language.

  10. Ive the same problem as Jangla. Is there a solution to get full Realurl urls instead of www.domain.com/index.php?id=1234 ??

    Thank you!

  11. If you want your Google Sitemap to be available via yourdomain.tld/sitemap.xml use this code in the .htacces file:

    Redirect permanent /sitemap.xml http://www.domain.tld/?eID=dd_googlesitemap

  12. Language support just works. Append the language parameter L to get a separate sitemap:


  13. I have some Problem where to put the code.
    tx_ddgooglesitemap.forceStartPid = XXX
    I have tried in Template TS under config. and as plugin. and both did not work.

    1. The greatest secret of all: read the manual! :)

    2. For me ist is a big secreet. I read and read ans read and du not find.


      If your home page is a shortcut...
      If your home page is a shortcut, TYPO3 will automatically load Google sitemap in the context of the shortcut destination. Typically it results in a trucated sitemap (only pages below the shortcut destination). In order to fix this problem, set the tx_ddgooglesitemap.forceStartPid TypoScript option to the page ID where the sitemap should really start.

      Do you like help?

    3. Does it tell you to set anything under plugin or config? :)

      It says clearly: "tx_ddgooglesitemap.forceStartPid", not "config.tx_ddgooglesitemap.forceStartPid" or "plugin.tx_ddgooglesitemap.forceStartPid".

    4. Thanks a lot. I put it in the first line in Template TS-Setup an it works fine. Thanks a lot for this help and this great extension. Some times things are more simple than it looks. :)