License registered for a different bundle identifier

Question: We’re seeing the following license error…

PSPDFKitError: Failed to initialize PSPDFKit: Invalid license key. Failed to activate PSPDFKit for 'example.domain'. Error: Your license has been registered for a different bundle identifier - not "example.domain".
Each PSPDFKit license is only valid for one explicit bundle ID and one distribution method (Enterprise or public App Store). Please contact sales at with your requirements for a new license. PSPDFKit Web


This error can be caused when you have both example.domain and www.example.domain licensed. Since you’re using the same license key for both domains, it can cause the error to happen intermittently, depending on whether the visitor uses www.example.domain (note: Safari simplifies the domain that’s shown to you, so unless you click on the address bar to show the full URL it might show you example.domain even though it is accessing www.example.domain.

In order to make sure you’re loading the correct license key based on the domain your users are visiting you can use something like the following:

let licenseKey = null;
if ( === "example.domain") {
  licenseKey = "<insert license key for example.domain>";
} else if ( === "www.example.domain") {
  licenseKey = "<insert license key for www.example.domain>";
} else {
  console.error("Invalid location -> escalate to ops");

We are working on improving this error message so it is more clear.


It’s generally recommend serving a web app only on one subdomain, either www or no subdomain as this can reduce potential problems. See for more information.