Can I use a single license on a multi-context site or across different domains?

Licenses are valid for a single MODX installation, and assigned to a single primary domain. If you serve multiple front-end domains from that one site that is allowed, however you will need to enforce the single primary domain to avoid license issues. 

Even if you have not yet used the manager on one of the front-end domains or don't intend to, the redirect helps avoid issues down the line.

On Apache servers, add the following rewrite rule to your .htaccess file. Replace the domain on the first and the third line with the primary domain you wish to use. If you have renamed the manager, adjust the second line accordingly.

RewriteCond %{HTTP_HOST} !^primary-domain\.com$ [NC]
RewriteCond %{REQUEST_URI} ^/manager [NC]
RewriteRule ^(.*)$ https://primary-domain.com/$1 [R=301,L]<br>

On NGINX servers, it could look something like this (in the location block). In this case you'll have to list all front-end domains and subdomains.

set $mgrcheck $host$request_uri;

if ($mgrcheck ~* "((www.|sub1.|sub2.)domain1.com|(www.)?domain2.org|(www.)?domain3.(org|com))/manager") {
    rewrite ^ https://domain.com$request_uri;
}

If you had license issues triggered on a front-end or secondary domain, please check your rewrites and send us an email to close the license issue.

Still need help? Send us an email Send us an email