MODX Community

Sitemap for multi domain

Summary

I’m using MODX for multi domain. So one CMS serving multiple domains.
For all websites, I want to have a sitemap.xml but when I use the GoogleSiteMap plugin, I see the same sitemap on the second domain.

Step to reproduce

Install multi domain on your MODX install.
Install GoogleSiteMap plugin
Add a page calles sidemap, use a empty page, make it xml
In the content field add [[!GoogleSiteMap]]

Observed behavior

domain1.com/sitemap.xml

domain2.com/sitemap.xml contains the same content from domain1.com

Expected behavior

domain1.com/sitemap.xml show pages from domain1
domain2.com/sitemap.xml show pages from domain2

Environment

MODX Revolution 2.7.1-pl

1 Like

Try to use the following call:

[[GoogleSiteMap? &context=`[[*context_key]]`]]

2 Likes

If you don’t necessarily want to use the extra and don’t have too frequently sites added, you could also use an online sitemap generator like this one.

1 Like

It works, thank you Jako! Danke schön. Please YJ Tso & Garry Nutting, can you add this in the documentation of the plugin?

1 Like

It looks like a known issue, that is somehow forgotten: https://github.com/modxcms/GoogleSiteMap/issues/9

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.