Using a Custom Domain
Overview
Section titled “Overview”You can route Elo events through your own domain by creating a CNAME record. This approach can help with:
- Ad blocker bypass: Some ad blockers target third-party tracking domains. Using your own domain can improve event delivery reliability.
- First-party context: Events appear to come from your domain, which can improve data accuracy and reduce browser restrictions.
Setup Instructions
Section titled “Setup Instructions”-
Create a CNAME Record
Add a CNAME record in your DNS provider pointing to Elo’s platform:
elo.yourdomain.com → cname.elo.adReplace
yourdomain.comwith your actual domain. You can use any subdomain you prefer (e.g.,elo.yourdomain.com,ads.yourdomain.com, etc.). -
Wait for DNS Propagation
DNS changes can take time to propagate globally. This typically ranges from:
- A few minutes (with modern DNS providers)
- Up to 48 hours (in rare cases with older systems)
-
Verify DNS Propagation
Before updating your website, verify that your CNAME is working correctly by visiting the health check endpoint:
https://elo.yourdomain.com/v1/healthYou should receive:
- HTTP Status:
200 OK - Response Body:
{"status":"ok"}
If you see an error or timeout, your DNS hasn’t propagated yet. Wait a bit longer and try again.
- HTTP Status:
-
Update Your SDK Configuration
Once DNS verification is successful, use your custom domain as the
backendUrlwhen initializing the SDK:import { EloSDK } from '@elo-ads/web-sdk'const sdk = new EloSDK({publisherId: 'YOUR_PUBLISHER_ID',adUnitId: 'YOUR_AD_UNIT_ID',backendUrl: 'https://elo.yourdomain.com',}) -
Deploy and Test
Deploy your updated code and verify that:
- Ads are loading correctly
- No console errors appear
- Network requests are going to your custom domain