Search code examples
typo3xml-sitemap

Multiple sitemap setup for TYPO3 with dd_googlesitemap


I am trying to create a multiple sitemap setup for TYPO3 6.2 with the dd_googlesitemap extension, but from reading the docs I cannot figure out if this is doable with the extension itself.

Namely, I have two top-level domains with one codebase, e.g. example.com and example.org. If I create the basic sitemap I will get the content of both domains (because of using the same codebase/database). I want the sitemap to be scoped by the website domain, so that I can have example.com/sitemap_com.xml and example.org/sitemap_org.xml.

Has someone stumbled upon this issue before and knows if it's possible with dd_googlesitemap?


Solution

  • Apparently, dd_googlesitemap works like this by default. When triggering the different domain it will initialize the correct root page ID in the Generator class. So, by opening example.com/sitemap.xml you get all the pages under the example.com domain, and example.org/sitemap.xml will give you all pages under example.org.

    Another point is that you can as well initialize the root page ID yourself if you want to, by adding id=xxx to the URL, such as example.com/index.php?eID=dd_googlesitemap&id=xxx.