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.

12 comments:

  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.

    ReplyDelete
  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!

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

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

    ReplyDelete
  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:

    http://forge.typo3.org/projects/extension-dd_googlesitemap/issues



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

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

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

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

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

    ReplyDelete
  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!

    ReplyDelete
  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

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

    www.domain.com/?eID=dd_googlesitemap&L=1

    ReplyDelete