Multi-domain set-up in 1 modx cloud


New modx cloud user. Have some experience (1 year) with maintaing/expanding upon existing modx sites. But never build one from scratch.

Now to make things a bit worse for myself, I am building 2 websites at the same time. And first I was doing this in 2 clouds, 2 repos as well as 2 basically the same set-ups (anything new from 1 I would put over to the other). So I decided to try and go set-up a multi-domain set-up in 1 cloud and make it 1 repo as they are both going to be personally used websites only.

So far so good… both links work for now.(The under construction basic pages I created)

Before I explain the issues I am having I will list the things I am using here:

  • Modx Cloud with PHP 7.4

  • Modx 3.0.1-pl

  • 4 domains (1 for 108 and 3 for kroketgames)

  • XRouting plug-in

  • CrossContextSettings plug-in

  • If there are any documentations I missed that might be applicable feel free to just share a link with me as an answer.

The issues I am running into:

  1. Friendly URL’s is something I intend to use (but every attempt I tried, was without .htaccess settings and according to posts I saw this is probably the issue). Now the question regarding this point: Anyone able to point me in the direction of bare minimum .htaccess set-up with the use of multiple domains as well as FURL’s?
    (I am currently using the standard ht.access file unedited(that comes with the 3.0.1 install), as the website is pretty much closed off anyways)

  2. Best practise for building up all the pages/FURL’s/redirects on a multi-domain environment (if anyone has any references to any relevant documentation, this would be very welcome)

  3. Any generic best practise tips anyone might have for this type of set-up are also welcome. I am doing this on a trial & (alot of) error basis, and I don’t want to keep harassing modx support every day :stuck_out_tongue_closed_eyes: :see_no_evil:!

Some screenshots of current settings used:

As you can see its pretty basic at the moment.

Thank you for any help given.

Kind regards,


The standard .htaccess file should work.

The XRouting extra then switches to the correct context, based on the value $_SERVER['HTTP_HOST'] of the request.

If it doesn’t work, maybe try to debug it as described here:

Also, I believe that the site_url context setting should contain https://.

1 Like

Also, I believe that the site_url context setting should contain https:// .

That worked! Solved 1 thing I believed was a cache issue, but turned out to be this setting.

The part of the htaccess does not yet seem to work, but that might be (thought of that this morning) because it seems to use NGINX as a webserver:

So I will look into the syntax for that, as that is new for me. But from what I read on the web so far it should be fairly easy to translate syntax from Apache to nginx. So I will try and figure that out.

For now my question is answered, and any other generic advice is still welcome if people have some. But this thread can be closed if we want to keep it neat.

Kind regards,