Custom Endpoints
Proxy Mobana through your own domain for cleaner URLs and ad-blocker bypass.
Why Use Custom Endpoints?#
- Cleaner campaign URLs:
yourdomain.com/da/redirectlooks better thana1b2c3d4.mobana.ai/redirect - Ad-blocker bypass: Some ad blockers block third-party attribution domains. Your own domain is less likely to be blocked.
- Easier migration: If you ever switch attribution providers, your campaign URLs don't change.
- Brand consistency: Keep all URLs under your brand's domain.
How It Works#
- Choose a path on your domain (e.g.,
yourdomain.com/da) - Set up a reverse proxy that forwards only the required endpoints to
YOUR_APP_ID.mobana.ai - Enter your custom endpoint URL in App Settings → Integration and save
- Configure the SDK to use your custom endpoint
- Use your custom URL in campaign links
The path you choose (e.g., /da) is configurable — use any path that fits your domain structure. The App Settings panel generates the correct proxy config automatically once you enter your endpoint URL.
Proxy Configuration#
Choose one of the following methods to route requests from your domain to Mobana. Replace YOUR_APP_ID with your actual App ID and /da with your chosen path.
Option 1: Cloudflare DNS (CNAME)
The simplest option if your domain is on Cloudflare. Point a subdomain to Mobana via a proxied CNAME record — no server configuration required.
Make sure the Cloudflare proxy is enabled (orange cloud icon), not DNS-only (grey). Cloudflare handles SSL automatically when proxy is enabled.
This method requires a dedicated subdomain (e.g., da.yourdomain.com). If you need a path-based endpoint like yourdomain.com/da, use the reverse proxy option below instead.
Option 2a: Reverse Proxy (nginx)
Add the following block to your nginx server configuration. Only the specific Mobana endpoints are forwarded — all other traffic on your domain is unaffected.
location ~ ^/da/(redirect|find|ping|conversion|flows.*)$ {
proxy_pass https://YOUR_APP_ID.mobana.ai/$1$is_args$args;
proxy_set_header Host YOUR_APP_ID.mobana.ai;
proxy_set_header X-App-Key $http_x_app_key;
proxy_set_header X-Original-CF-Connecting-IP $http_cf_connecting_ip;
proxy_set_header X-Original-Remote-Addr $remote_addr;
proxy_ssl_server_name on;
}Option 2b: Reverse Proxy (Apache)
# Enable required modules: mod_proxy, mod_proxy_http, mod_ssl, mod_rewrite
<Location "/da">
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/da/(redirect|find|ping|conversion|flows.*)$
RewriteRule ^/da/(.*)$ https://YOUR_APP_ID.mobana.ai/$1 [P,QSA,L]
ProxyPassReverse / https://YOUR_APP_ID.mobana.ai/
RequestHeader set Host "YOUR_APP_ID.mobana.ai"
RequestHeader set X-App-Key "%{HTTP_X_APP_KEY}s"
RequestHeader set X-Original-Remote-Addr "%{REMOTE_ADDR}s"
</Location>
SSLProxyEngine OnThe proxy must forward the client's real IP address. The nginx and Apache configs above include the correct headers (X-Original-Remote-Addr and X-Original-CF-Connecting-IP). This is critical for probabilistic attribution matching. The Cloudflare DNS approach handles this automatically.
SDK Configuration#
After saving your custom endpoint in App Settings, tell the SDK to use it:
// In your React Native app
Mobana.init({
appId: 'YOUR_APP_ID',
appKey: 'YOUR_APP_KEY',
endpoint: 'https://yourdomain.com/da', // Your custom endpoint
});Campaign URLs#
Use your custom domain in campaign links:
# Campaign URL using your custom domain
https://yourdomain.com/da/redirect
?utm_source=facebook
&utm_campaign=summer_sale
&data={"promo":"SUMMER20"}Testing Your Setup#
Use the ping endpoint to verify your proxy is working correctly:
curl https://yourdomain.com/da/ping
# Should return:
# {
# "ok": true,
# "appId": "YOUR_APP_ID",
# "appValid": true,
# "clientIp": "your.ip.address"
# }You can also test directly from the Dashboard: go to App Settings → Integration, enter your custom endpoint URL, and click Test.
Troubleshooting#
IP Address Shows Proxy IP
If /ping shows your proxy server's IP instead of the client's IP, ensure your proxy is setting the X-Original-Remote-Addr header as shown in the configs above.
SSL/TLS Errors
Ensure your proxy supports TLS 1.2+ and has a valid SSL certificate. For nginx, make sure proxy_ssl_server_name on is set so SNI is sent correctly to mobana.ai.
404 on Proxy Routes
The proxy only forwards the specific endpoints Mobana uses: redirect, find, ping, conversion, and flows/*. Any other path under your prefix will not be proxied and will return a 404 from your own server.
CORS Errors
The Mobana API handles CORS automatically. If you see CORS errors, check that your proxy isn't modifying or stripping CORS headers in the response.
502 Bad Gateway / Could Not Resolve Host
If nginx can't resolve YOUR_APP_ID.mobana.ai, add a resolver directive to your server block:
resolver 8.8.8.8 valid=30s;