<p>A few pre-requisites:</p>

<ol>
<li><p>A Craft purchase/edition is tied to the <code>craft/config/license.key</code> file that is in place at the time the purchase is made and wherever that file goes, the purchase/edition will follow.</p></li>
<li><p>A <code>craft/config/license.key</code> file can only be tied to one "public" domain at a time.</p></li>
<li><p>Craft license validation doesn't run on "non-public" domains and you're able to trial the different editions of Craft for as long as you want on non-public domains.</p></li>
</ol>

<p><a href="https://craftcms.com/support/license-enforcement#how-do-we-determine-craft-is-running-on-a-public-domain" rel="nofollow noreferrer">https://craftcms.com/support/license-enforcement#how-do-we-determine-craft-is-running-on-a-public-domain</a></p>

<p>Craft will treat <code>app-client.local.mycompany.com.br</code> as a "non-public" domain, because it has one of the keywords we're looking for in its own segment in the subdomain.  You can see a list of those keywords here in number 4 of the previous link.</p>

<p>The rest of those domains Craft treats as "public" because they don't match any of the rules in that link, so license validation will run on them.</p>

<p>You don't say exactly what you're issue is, but if you purchased Craft on the development domain and you're using that same <code>license.key</code> file on the three other public domains, you're probably getting a warning in the Control Panel saying that license is already in use on another domain.</p>

<p>Since they are all for the same "site", you can either tell everyone that has access to the Control Panel to ignore the message and to <em>not</em> transfer the license away from the production domain, or you can change your <code>qa</code> and <code>hom</code> domains so Craft treats them as "non-public" and license validation won't run.</p>

<p>More related reading: <a href="https://craftcms.com/support/license-key-info" rel="nofollow noreferrer">https://craftcms.com/support/license-key-info</a></p>

CC BY-SA 3.0
2018-01-12T17:19:29.653Z
2018-01-12T17:19:29.653Z
Brad Bell
<p>We have a very simple development process, and I believe this process has messed up the license.</p>

<pre><code>app-client.local.mycompany.com.br =&gt; developer environment (intranet only)
app-client.qa.mycompany.com.br =&gt; quality insurance environment (openshift)  (intranet only)
app-client.hom.mycompany.com.br =&gt; client test environment (openshift) (intranet only,client access via vpn)
something.com.br =&gt; client website
</code></pre>

<p><code>local/qa/hom</code> I'm using "environment = dev", but somehow <code>local</code> is working but <code>qa</code> and <code>hom</code> is not. </p>

<p>The database is a copy =></p>

<ul>
<li>from <code>local</code> to <code>qa/hom</code> when is a website in development</li>
<li>from <code>prod</code> to <code>local/qa/hom</code> when it is an already made website</li>
</ul>

<p>It means every environment has its own database.</p>

<p>How to proceed to use dev licensing at <code>local/qa/hom</code> ?</p>

<craft3><multi-environment><license>
How to use license in different environments
# How to use license in different environments

(Asked by: username_0 on 2018-01-12)

We have a very simple development process, and I believe this process has messed up the license.
app-client.local.mycompany.com.br => developer environment (intranet only)
app-client.qa.mycompany.com.br => quality insurance environment (openshift)  (intranet only)
app-client.hom.mycompany.com.br => client test environment (openshift) (intranet only,client access via vpn)
something.com.br => client website

local/qa/hom I'm using "environment = dev", but somehow local is working but qa and hom is not. 
The database is a copy =>

from local to qa/hom when is a website in development
from prod to local/qa/hom when it is an already made website

It means every environment has its own database.
How to proceed to use dev licensing at local/qa/hom ?

**Tags:** craft3, multi-environment, license


---

## 1 answers

### Answer by username_1 on 2018-01-12. Score: 1

A few pre-requisites:

1. A Craft purchase/edition is tied to the `craft/config/license.key` file that is in place at the time the purchase is made and wherever that file goes, the purchase/edition will follow.
2. A `craft/config/license.key` file can only be tied to one "public" domain at a time.
3. Craft license validation doesn't run on "non-public" domains and you're able to trial the different editions of Craft for as long as you want on non-public domains.

<https://craftcms.com/support/license-enforcement#how-do-we-determine-craft-is-running-on-a-public-domain>

Craft will treat `app-client.local.mycompany.com.br` as a "non-public" domain, because it has one of the keywords we're looking for in its own segment in the subdomain. You can see a list of those keywords here in number 4 of the previous link.

The rest of those domains Craft treats as "public" because they don't match any of the rules in that link, so license validation will run on them.

You don't say exactly what you're issue is, but if you purchased Craft on the development domain and you're using that same `license.key` file on the three other public domains, you're probably getting a warning in the Control Panel saying that license is already in use on another domain.

Since they are all for the same "site", you can either tell everyone that has access to the Control Panel to ignore the message and to *not* transfer the license away from the production domain, or you can change your `qa` and `hom` domains so Craft treats them as "non-public" and license validation won't run.

More related reading: <https://craftcms.com/support/license-key-info>


---

