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.