Custom Domains
To use a custom domain with Keygen, you will need to email [email protected]
with the domain name you'd like to use. Custom domains require a subscription add-on
(pricing is available here). Once we receive your domain, we'll send
you a set of DNS records that you can add via your DNS provider. Typically, this will
be a single CNAME
record.
Custom domains allow you to access Keygen's API using your own domain.
For example, the following request,
POST https://api.keygen.sh/v1/accounts/example-com/licenses/actions/validate-key
Would become,
POST https://licensing.example.com/v1/licenses/actions/validate-key
(Note the omitted /accounts/example-com
URL prefix.)
Adding the CNAME
Navigate to your DNS provider and add a CNAME
record, using your chosen subdomain and
the DNS target that we provide you with. For example, a CNAME
will look something
like this:
Type | Name | Target |
---|---|---|
CNAME |
licensing.example.com |
shrouded-velociraptor-cga4lan0qv5rk0f99245vf5w.herokudns.com |
Once the CNAME
record has been added to your domain's DNS, it may take up to 24–48 hours
for an automated TLS certificate to be initialized.
Using Cloudflare? Please use "DNS only" mode.
Testing the CNAME
Once your CNAME
record has been added to your domain's DNS, you can test it by issuing
an HTTP request to your chosen subdomain:
curl -v https://licensing.example.com/v1/ping
The above HTTP request should respond with a 200 OK
response. If you receive a TLS
error, a TLS certificate has likely not been initialized yet. If it times out, DNS
likely has not propagated fully. Depending on your provider, DNS propagation may take
up to 24–48 hours.