On this page
What this issue is
Server-side GTM runs a tagging server that you own. Many sites serve the GTM loader (gtm.js) and send tracking hits through a custom subdomain of their own site, for example metrics.example.com. This is called a first-party or custom loader domain.
That subdomain depends on DNS (the system that turns a name into a server address). If the record is deleted, changed, expired or points at the wrong target, the browser cannot reach your tagging server. The page itself loads fine, but the loader script and every hit sent to that domain fail.
- Visitor opens pagePage loads normally
- Browser requests loadermetrics.example.com/gtm.js
- Tags loadGA4, Ads, Meta tags never start
- Hits reach platformsConversions not recorded
The page works, but the request to the custom domain cannot resolve, so everything after it is lost.
Why it costs you leads or sales
Visitors still fill in forms and buy, so it looks like nothing is wrong. But analytics and ad platforms stop receiving data. Conversions vanish from reports, and ad platforms lose the signals they use to optimise bidding. You may then cut budget on campaigns that were actually working.
The damage can last for weeks because nobody sees an error. It often starts after a DNS change, a domain transfer, a CDN or hosting move, or a lapsed certificate.
Example: recorded conversions per day before the DNS record broke and after. Real sales did not change, only what was recorded.
How to check if your site has it
Find your custom domain
View your page source and search for
gtm.js. Note the host, such asmetrics.example.com. You can also find it in your sGTM container under Admin > Container Settings > Tagging server URL.Open the loader URL in a browser
Visit
https://metrics.example.com/gtm.js?id=GTM-XXXXXXX(use your own host and ID). You should see JavaScript. A browser error such as 'server not found' or a certificate warning means the DNS or SSL is broken.Look at the browser Network tab
Open DevTools > Network, reload your page and filter by your custom domain. Requests marked failed with
ERR_NAME_NOT_RESOLVEDpoint to DNS.Query the DNS
Run the commands below and compare the result with the records your hosting provider gave you.
dig metrics.example.com A +short
dig metrics.example.com AAAA +short
dig metrics.example.com CNAME +short
curl -I "https://metrics.example.com/gtm.js?id=GTM-XXXXXXX"| Result | Likely cause |
|---|---|
| No answer from dig | Record deleted or never created, or the domain or DNS zone expired |
| Resolves to an unexpected IP | Record points to an old server or the wrong host |
| Resolves, but certificate error | SSL certificate not issued or expired, or the host does not know the domain |
| Resolves, but 404 or 5xx | Tagging server is down or the path is not mapped (a different issue) |
How to fix it
The exact records depend on where your server container runs (Google Cloud Run or App Engine, or a managed or third-party host). Use the values your host shows, not values copied from another site.
Get the correct records
In your sGTM container open Admin > Container Settings and the custom domain section, or check your hosting provider's custom domain page. Note the record type (A, AAAA or CNAME) and the value.
Open your DNS provider
This is where your domain's nameservers point, such as your registrar, Cloudflare or your host. Check you are editing the active zone.
Recreate or correct the record
Add the missing record or change the wrong one for the subdomain. Remove old conflicting records for the same name. A CNAME cannot sit alongside other records on the same name.
Check proxy settings
If you use a CDN proxy such as Cloudflare, make sure it is set up as your host's instructions say. A wrong proxy setting can block certificate issue.
Wait for DNS and the certificate
Changes can take from minutes to a few hours. Managed certificates usually issue after DNS resolves correctly.
Check the domain mapping in your host
On Google Cloud, confirm the custom domain is still mapped to the service and shows as active.
Questions people ask
Why is my sGTM custom domain not working?
Most often the DNS record for the subdomain was deleted, changed or points at the wrong target, or the SSL certificate was not issued or has expired. Check it with dig and by opening the gtm.js URL in a browser.
How do I check if my server-side GTM domain resolves?
Run dig yoursubdomain.example.com and compare the result with the records your host gave you. Then open the gtm.js URL in a browser. It should return JavaScript, not a connection or certificate error.
Will a broken sGTM domain stop my website loading?
Usually not. The page loads, but the GTM loader and tracking requests to that domain fail. That is why the problem often goes unnoticed while conversions disappear from reports.
How long does it take for DNS changes to work?
Often minutes, sometimes a few hours, depending on the record's TTL (how long it is cached). Managed certificates may take extra time after DNS resolves.
Can FunnelGuard detect a broken sGTM loader domain?
Yes. FunnelGuard checks pages for broken resources, so a loader or tracking request that fails to load is flagged, with a screenshot and a likely cause.
Related issues
- TRK-119Server container (sGTM) endpoint downFix guide
- TRK-121sGTM client not claiming requests (hits 400)Fix guide
- TRK-122sGTM forwarding to GA4 broken while browser hit succeedsFix guide
- TRK-123sGTM forwarding to Meta CAPI brokenFix guide
- TRK-124sGTM cloud instance out of quota / scaling errorsFix guide
- TRK-099GTM container snippet missingFix guide