Multi Domains power-up
Updated Mar 28, 2025
Overview
The Multi Domains power-up allows you to map multiple custom subdomains or even entirely different domain names to a single sGTM (server-side Google Tag Manager) container. By default, Google Tag Manager only lets you specify one tagging server URL for each container, but the Multi Domains power-up lifts this limitation.
The Multi Domains power-up is available with server-side GTM subscriptions of Business and higher.
Benefits of Multi Domains
- Single sGTM container for multiple sites - instead of deploying separate server containers for each domain, you can manage them all from one container. This streamlines setup and ongoing maintenance across different web properties.
- Unified tracking setup - you can implement the same set of core tags, triggers, and variables across all of your sites. This consistency makes data easier to compare and consolidate.
- Server-side cookies - server-side tracking with a custom domain ensures that cookies are seen as first-party. By mapping each of your websites’ custom domains to the server container, you maintain first-party cookies for all of them, boosting data accuracy and resilience against browser privacy features (e.g., ITP).
- Easier management of complex web ecosystems - if you have separate websites for each country or language, or maybe a set of sites in one niche, you can handle shared tags (like GA4) uniformly while still letting each domain keep its own custom subdomain for first-party cookies.
How to set up the Multi Domains power-up
1. Log in to your stape.io account.
2. Select your sGTM container on the dashboard.

3. Click Power-ups, then click the Use button next to the Multi-Domains panel.

4. Click the Add custom domain button.

5. There are two ways of adding a custom domain:

- Automatically (via Entri) - the easiest way to connect domains. Log in with your DNS provider details via Entri, and give us one-time permission to connect your domain. Check the full list of supported DNS providers by Entri.
- Manually - After you add a custom domain to your Stape container, you will see DNS records that should be added to your DNS provider to verify the custom domain. The DNS records depend on the server location and which CDN options you choose.
Here are all available configurations for your custom domain (don’t worry, we’ll cover the configuration process in later sections):
- Domain name - enter your tagging server domain (example: gtm.my-domain.com).
- Add CDN - toggle this switch if you want to load js files (gtm.js, gtag.js, analytics.js, etc.) from a server closer to your site’s visitors, resulting in a faster js file serving.
- Add CDN switch disabled - no type of CDN is used.
- Stape Global CDN - loads scripts from a server closer to a user visiting your website.
- Own CDN (incompatible with the Automatically (via Entri) connection option, see below) - routes sGTM custom domain and proxy sGTM traffic through the DNS provider of your website. In this case, the IP addresses of your website and the custom domain of the sGTM will match, and server-side cookies will be considered first-party. As a result, it gives the ability to increase cookie duration.
- Advanced settings - here you can tick the box to Use A records instead of CNAME records. If DNS providers restrict adding duplicate records, you should use CNAME record. If not, then choose A records. Please note that this setting is incompatible with the Add Global CDN setting.
- How to connect - choose the way you want to connect domains.
- Automatically (via Entri) - the easiest way to connect domains - you simply log in with your DNS provider details via Entri and give us one-time permission to connect your domain.
- Manually - this option will provide you with DNS records that should be created within your DNS provider to verify the custom domain.

Adding a custom domain with CNAME record
Enter your Domain name, select if you want to Add CDN or not, and whether you want to connect Automatically or Manually → click Next.
If you do not use the Stape Global CDN option, you will be provided with one CNAME record to add to your DNS provider. Otherwise, you will be provided with two CNAME records.

Here is an example of how to add these records to Cloudflare DNS provider, but you can do the same with any provider you use.
1. Visit your Cloudflare profile → open the DNS tab in the side menu → open the Records screen → click Add record.

2. Enter the DNS records from Stape:
- Type - select CNAME.
- Name - copy the HOST parameter from Stape.
- Target - copy the VALUE parameter from Stape.
- Proxy status - make sure to toggle this OFF.
If Stape provided you with several CNAME records, repeat the process of adding records for each of them. After that, click Save.

3. Once you’ve entered the DNS records to your DNS provider, return to the Stape domain settings page and click Verify.

4. Wait for Stape to finish verifying your custom domain (when the container status bar changes from Verifying to Ready). Usually, it takes from 30 minutes to 2 hours, but in some cases it can take up to 72 hours.

5. Go to your Google Tag Manager Server container → click Admin → click Container Settings → change the Tagging server URL to your subdomain.

6. If you use a custom domain, updating the Web GTM script on your website is highly recommended. This tweak will load gtm.js from your domain. To do so, replace the default domain googletagmanager.com with the custom domain you set up in the previous step.

Adding a custom domain with A and AAAA records
If you want to set up your custom subdomain using A and AAAA records, you can do so using the option Use A records instead of CNAME records under Advanced settings.
Enter your Domain name, click Advanced Settings → tick the box Use A records instead of CNAME records, then select if you want to Add CDN or not and whether you want to connect Automatically or Manually → click Next.

You will be provided with a set of A and AAAA records to add to your DNS provider.

Here is an example of how to add these records to Cloudflare DNS provider, but you can do the same with any provider you use.
1. Visit your Cloudflare profile → open the DNS tab in the side menu → open the Records screen → click Add record.

2. Enter the DNS records from Stape:
- Type - select CNAME.
- Name - copy the HOST parameter from Stape.
- Target - copy the VALUE parameter from Stape.
- Proxy status - make sure to toggle this OFF.
Repeat the process for each DNS record provided to you by Stape. After that, click Save.

3. Once you’ve entered the DNS records to your DNS provider, return to the Stape domain settings page and click Verify.

4. Wait for Stape to finish verifying your custom domain (when the container status bar changes from Verifying to Ready). Usually, it takes from 30 minutes to 2 hours, but in some cases it can take up to 72 hours.

5. Go to your Google Tag Manager Server container → click Admin → click Container Settings → change the Tagging server URL to your subdomain.

6. If you use a custom domain, updating the Web GTM script on your website is highly recommended. This tweak will load gtm.js from your domain. To do so, replace the default domain googletagmanager.com with the custom domain you set up in the previous step.

Testing Multi Domains
To check that the Multi Domains power-up works properly, go to your sGTM container’s workspace. There should be a new selector icon next to the Preview button. Click the icon → select the new domain you just added → click Preview. If you can see the Summary window, then everything is correct and the power-up is working. Please keep in mind that the first launch of the preview on a newly added domain may take about a minute.
