Domains and subdomains management

Usually, you should only deploy the tag on the main domain of your website (no other domain or subdomain). Indeed, Web Push Standard that Batch technology relies on doesn't allow cross-domains (or subdomains) subscriptions.

It means that if you deploy web push on 2 domains, linked to the same Batch app, users will get the opt-in request on each domain (or subdomain). If they do accept to receive notifications on both domains, they will get duplicate notifications.

Depending on your specific configuration, several options are available. Please reach out to our support team so we can discuss what will the best fit for your goals.

You'll find below most common usecases and solutions.

I have a main domain that drives most of the traffic, and less strategic subdomains

For example :

You should only deploy Web Push on the main domain: https://mywebsite.com.

All subdomains are important and I want to allow users to subscribe everywhere

For example :

Add each subdomain to Batch dashboard, and manage them as independant implementations. You will need to develop a different push strategy for each subdomain to avoid duplicate notifications for users who subscribe on several domains.

I use subdomains for language management

For example:

You can treat each subdomain as a separate implementation as detailed above. But, in this specific usecase, it's unlikely that your users often switch subdomains, so it may be a good option to link all these subdomains to the same app on Batch. Make sure you set the right language for your users, according to the website version they use: Custom region/language. You'll be able to target them according to their region and language in your campaigns.

Subdomain configuration for Safari APNs

If you choose to link the same Batch app to multiple subdomains, you will need to add each subdomain to the list of allowed domains defined in ⚙️ Settings → Push Settings. A push certificate will be required for each added subdomain.

For example, if you would like to implement web push on :

You will need to generate 2 certificates, and declare both of these domains in ⚙️ Settings → Push Settings.

Safari multiple subdomains configuration