Learn more about how to configure custom domains for your Knock account to use for link tracking, email open tracking, and the hosted preference center.
Setting a custom domain is important for deliverability and branding. You run the risk of having your messages marked as spam if the sending domain and the domain you're routing to for links are different.
By default, Knock uses a variety of domains for link tracking, short links in SMS and WhatsApp, and email open tracking. We also use the p.knock.app domain for the hosted preference center. These domains are shared across all accounts and are not configurable. Custom domains enable you to override these defaults and use your own domains.
Setting up a custom domain
#
To set up a custom domain, navigate to the Domains page under the Account section of your Knock dashboard settings.
1
Add a domain
Click "Add domain" under the tracking link or preference center section, depending on what you'd like to configure.
You'll be prompted to enter the domain you want to use, such as link.yourcompany.com or prefs.yourcompany.com. Click "Continue to verification."
2
Configure DNS records
Before you can complete the setup process, you'll need to navigate to your domain registrar and add a CNAME record to the DNS configuration for your domain. The setup modal in your Knock dashboard will display the CNAME record you need to add.
The CNAME target depends on how you plan to use the domain:
Link tracking, short links, and open tracking. Point the CNAME record to cname.knock.app.
Preference center. Point the CNAME record to prefs-cname.knock.app.
Here are some DNS configuration instructions for common providers:
Once you've added the CNAME record, click "Check verification" to verify that the domain's DNS records are pointing to the correct value. Please note that it can take up to 48 hours for the DNS changes to propagate, so you may need to come back later and try again if verification does not succeed immediately.
4
Assign the domain to an environment
Once the domain is verified, you'll assign it to one or more environments. You can assign the same custom domain to multiple environments, or you can use different custom domains across environments for testing purposes.
5
Select where the domain is used
For tracking links only, you will also need to select where the domain is used. Choose the relevant option(s) from the list of use cases:
Link tracking. These are links used for tracking link clicks within your notifications. Link tracking is used across many different channels, including email, in-app feed, SMS, and WhatsApp.
Short links. These are links used for generating tracked short links in SMS and WhatsApp messages.
Open tracking. These are links used for generating a 1x1 transparent tracking pixel, currently used only within email notifications.
6
Apply your changes
Once you've selected where the domain is used, click "Apply and activate" to save your changes. Assignment changes take effect immediately for both tracked link and preference center domains.
Custom domains for the preference center
#
When a custom preference center domain is assigned to an environment, any {{vars.manage_preferences_url}} variables in your templates will automatically use your custom domain instead of p.knock.app.
Each environment can have at most one custom preference center domain. The same custom preference center domain can be assigned to multiple environments. To switch an environment to a different domain, verify the new domain and assign it. The previous domain will be automatically unassigned.
When assignment changes take effect
#
Assignment changes take effect immediately for both tracked link and preference center domains. New messages will use the currently-assigned custom domains for that environment. Already-sent messages are not affected. Links in already-sent messages continue to work as long as the domain they used (whether a default Knock domain or a previously assigned custom domain) remains verified in Knock and its DNS CNAME record stays intact.
Rolling out your custom domains
#
When you're ready to roll out your custom domains to production, assign the custom domain to your production environment.
Frequently asked questions
#
Please check that the CNAME record is pointing to the correct value. You can
also try to verify the domain again by clicking the "Check verification"
button. It can take up to 48 hours for DNS changes on your domain to
propagate. If after 48 hours the domain is still not verified, please reach
out to our support team at
support@knock.app.
Yes, you can use a brand new domain. However, we recommend that you warm up
the domain before using it for production traffic so that it has a good
reputation.
No. Links in already-sent messages that used default Knock domains (for both
tracked links and the preference center) continue to work after you set a
custom domain.
No, as long as the domain still exists in Knock and the DNS CNAME record is
intact. Links stop working only if you delete the domain in Knock or modify
the DNS record.
Yes. Verify the new domain and assign it to the environment. The previous
domain will be unassigned automatically. Links in already-sent messages will
continue to work if that domain still exists in Knock and the DNS CNAME
record is intact.
No. Commercial unsubscribe works
independently and is not affected by preference center custom domain
configuration.