Skip to main content

The benefits of using a custom subdomain

  • Significant increase in accuracy in browsers with strict privacy features such as Safari or Firefox.
  • Ad blockers can’t block the JavaScript agent. Most ad blockers stop requests sent to an external URL, but allow requests sent to an internal URL like a subdomain.
  • Cookies are recognized as “first-party.” This means they can be saved in the visitor’s browser and used to reliably identify visitors when third-party cookies are blocked completely (for example, Safari blocks all third-party cookies).
  • Fingerprint becomes harder to detect. Requests made directly to the Fingerprint domain are easy to detect. Routing through a subdomain on your own domain makes Fingerprint harder for automated blockers and fraudsters to detect.
Limitations of the subdomain integration
  • Since Safari 16.4, cookie lifetime in Safari is reduced to 7 days when using the custom subdomain setup. To keep cookies lasting up to one year in Safari, use a cloud proxy integration such as the Cloudflare proxy integration.
A note on DNS setupThis process requires adding DNS records to your domain, so make sure you have access to your DNS through your DNS provider. Here are guides for accessing DNS with some popular providers:
Prefer to automate setup? You can create, verify, list, and delete subdomains programmatically with the Management API instead of the dashboard. See Manage subdomains with the Management API.

1. Register your custom subdomain

To use a custom subdomain, the connection between your site and Fingerprint must be secure, so Fingerprint registers every subdomain with an SSL certificate. Each workspace can have up to 50 unique subdomains. During your free trial, you can use up to 5. If you need more than 50, contact the support team. To start, go to Settings > Subdomains and select New subdomain.
Subdomains page listing each subdomain and its status

The Subdomains page in the Fingerprint dashboard

Enter your domain, then select Add domain. Add each subdomain individually. After you add a subdomain, you can’t edit it. You can view its DNS details at any time, but to change a subdomain, delete it and add it again.
New subdomain form with a field to enter your domain and a step to add DNS records

Adding a new subdomain in the Fingerprint dashboard

Follow these guidelines when choosing a subdomain:
  • Use the subdomain only for sending requests to Fingerprint.
  • Match the subdomain’s primary domain to the request origin. For example, use metrics.yourwebsite.com when you run Fingerprint on yourwebsite.com.
  • Avoid the words fingerprint and fp in the subdomain name. Names like fingerprint.yourwebsite.com or fp.yourwebsite.com are easier for ad blockers to detect and block. Use a neutral name like metrics.yourwebsite.com instead.

2. Add DNS records

After you add your domain, the dashboard shows every DNS record you need in one place:
  • One CNAME record verifies that you own the domain.
  • Two A records route identification traffic to Fingerprint.
To add every record at once, select Copy all records and paste them into your DNS provider. This uses the standard zone file format, which providers like Cloudflare and Route 53 accept for bulk import. You can also copy each record individually.
You can add the two A records right away. They start routing traffic once your certificate is issued.
DNS records that need to be set

Showing the DNS records that need to be set

Fingerprint also checks your domain for a conflicting CAA record. A CAA record controls which certificate authorities can issue certificates for your domain, and a conflicting one prevents Fingerprint’s SSL provider (Cloudflare) from issuing yours. If Fingerprint finds a conflict, the dashboard shows an extra CAA record to add alongside the others, for example:
After you add the records, Fingerprint checks for them automatically and updates the status on the Subdomains page. To run a check right away, click Check DNS records. Fingerprint also emails you once your certificate is issued. DNS changes can take up to 24 hours to propagate. If Fingerprint doesn’t detect your records yet, wait a while and click Check DNS records again. If your records aren’t validated within 14 days, the subdomain times out. Add your DNS records and restart verification to try again.

Subdomain statuses

Each subdomain shows one of these statuses:
  • Pending: Fingerprint is validating your DNS records and issuing the SSL certificate. This can take up to 24 hours. To confirm a record was added correctly, run dig HOST +short in your terminal, using the host value of the record. If the record is set up correctly, its value is returned.
  • Active: Your records are validated and the certificate is issued. Your subdomain is ready to use.
  • Timed out: DNS validation timed out because the required records weren’t added in time. Add the DNS records, then restart verification.
  • Failed: The records were found, but the certificate can’t be issued. This usually happens when a conflicting CAA record blocks Fingerprint’s SSL provider (Cloudflare) from issuing certificates. Add the CAA record shown in the dashboard, wait for it to propagate, then delete the failed subdomain and add it again.
Using Cloudflare as your DNS provider?
  • Disable DNS proxying for all records associated with your subdomain.
  • Cloudflare sometimes adds CAA records that aren’t visible in the DNS panel. To see them, run dig caa yourwebsite.com, replacing yourwebsite.com with your domain.
  • Cloudflare’s CNAME flattening can prevent CNAME validation from working. Disable it if you have validation issues with Cloudflare DNS.

3. Configure the JavaScript agent

Once your subdomain is active, update the JavaScript agent endpoints property to point to your subdomain.
This snippet is also available in the dashboard on the subdomain setup page, prefilled with your custom subdomain.
Notes:
  • The endpoint subdomain should match the domain of your website.
  • If you use a Content Security Policy on your website, add the custom subdomain to the connect-src directive of your policy. See the CSP guide for more details.
  • If you issued a wildcard SSL certificate, the URL shows an asterisk, for example *.yourwebsite.com. Replace the asterisk with the subdomain you plan to use, for example metrics.yourwebsite.com.

Manage subdomains with the Management API

Instead of the dashboard, you can manage the full subdomain lifecycle programmatically with the Management API. This is useful when you automate your workspace setup, provision a subdomain per customer, or manage subdomains from a CI/CD pipeline. A subdomain works the same way whether you create it in the dashboard or through the API, and subdomains appear in both places regardless of how you created them. To use these endpoints, you need a Management API key. All requests use the base URL https://management-api.fpjs.io and follow the standard Management API authentication and versioning conventions.

Available endpoints

  • Register a subdomain (POST /subdomains): Registers the subdomain and returns every DNS record you need, the verification CNAME and the routing A records, in a single response.
  • List subdomains (GET /subdomains): Lists every subdomain in the workspace and its status. Filter by status to find, for example, subdomains still in the pending state.
  • Get subdomain (GET /subdomains/{id}): Retrieves a single subdomain with its DNS records and current status.
  • Verify subdomain (POST /subdomains/{id}/verify): Triggers an on-demand DNS check instead of waiting for the next background check. Use this right after you add your DNS records.
  • Delete subdomain (DELETE /subdomains/{id}): Deletes the subdomain and revokes its SSL certificate.

Typical flow

1

Register the subdomain

Send a POST /subdomains request with your subdomain, then read the DNS records from the response. All records, the verification CNAME and both routing A records, are returned at once, so you can add them in a single pass.
2

Add the DNS records

Add the returned records to your DNS provider. You can add the A records right away; they start routing traffic once your certificate is issued.
3

Wait for the subdomain to become active

Fingerprint validates your records automatically. To check immediately, call POST /subdomains/{id}/verify. Poll GET /subdomains/{id} until the status is active, or pass a webhook_url when you register the subdomain to receive a signed callback on every status change instead of polling.
4

Configure the JavaScript agent

Once the subdomain is active, configure the JavaScript agent to point at it.
The API reports the same subdomain statuses, returned as the values pending, active, timed_out, and failed. A timed_out or failed subdomain is safe to delete and recreate.
  • Subdomains are immutable. To change a subdomain, delete it and register a new one.
  • Deleting a subdomain that is active stops routing its traffic to Fingerprint. Any JavaScript agent still pointing at it will fail to identify visitors, so update your agent configuration before you delete a subdomain that is in use.
The same limits apply as in the dashboard: each workspace can have up to 50 subdomains, or 5 during a free trial.

Frequently asked questions

I completed the setup. How can I add more subdomains?

To add more subdomains, add them individually at any time:
  1. Go to Settings > Subdomains and select New subdomain.
  2. Repeat the setup steps for each new subdomain.
Each workspace can have up to 50 unique subdomains. During your free trial, you can use up to 5. If you need to manage more subdomains easily, check out the Cloudflare proxy integration. To request additional subdomains, contact the support team.

What’s next