Documentation
/

VM Domain Lock

VM Domain Lock

Pro
v6.13.0+

The vmDomainLock option restricts the obfuscated code to a list of specific domains and/or sub-domains. When the protected code runs on a different domain, it redirects to vmDomainLockRedirectUrl instead of executing.

This is the VM-aware counterpart of the non-VM domainLock option. When vmObfuscation is on, the non-VM domainLock is ignored - use vmDomainLock instead.

Browser-only feature

Domain lock relies on window.location and is silently disabled when target is node, bytenode, or service-worker. A service worker is the subtle case: it has no window, so domain lock does not apply - but it is still fetched over HTTP(S), so browserEnvironment still does.

Supported entry shapes:

  • Exact host - example.com
  • Wildcard subdomain - .example.com matches example.com and any subdomain
  • Specific subdomain - app.example.com

Leaving vmDomainLock empty disables the check entirely - every domain runs. See also non-VM domainLock for non-VM builds.