Skip to content
Tolinku
Tolinku
Sign In Start Free
Deep Linking · · 6 min read

Link Wrapping and Redirects: Impact on Deep Links

By Tolinku Staff
|
Tolinku deep linking fundamentals dashboard screenshot for deep linking blog posts

You configure Universal Links perfectly. You test them. They work. Then you send a link in an email through Mailchimp, and it stops working. The reason: Mailchimp wrapped your URL for click tracking, and the wrapped URL points to https://track.mailchimp.com/..., not your domain. Since the tracked URL is not associated with your app, Universal Links do not activate.

This is the link wrapping problem, and it affects almost every channel where deep links are distributed.

For deep linking challenges more broadly, see common deep linking challenges and how to solve them. For the fundamentals, see the complete guide to deep linking in 2026.

The Wrapping Chain

When an email service provider (ESP) wraps a link:

Original URL:   https://app.example.com/products/123
Wrapped URL:    https://track.esp.com/click?id=abc&url=https%3A%2F%2Fapp.example.com%2Fproducts%2F123

When the user clicks the wrapped URL:

  1. Browser opens https://track.esp.com/click?id=abc&url=...
  2. ESP records the click.
  3. ESP redirects (301 or 302) to https://app.example.com/products/123.
  4. Browser loads the final URL.

The problem: Universal Links are evaluated at step 1, not step 3. Since track.esp.com is not associated with your app, the app does not open. The user sees your website instead.

Service Wrapping Domain Purpose
Mailchimp track.mailchimp.com Click tracking
SendGrid u12345.ct.sendgrid.net Click tracking
HubSpot track.hubspot.com Click tracking, attribution
Salesforce MC click.em.example.com Click tracking
Braze ablink.example.com Click tracking
Bitly bit.ly URL shortening
Facebook l.facebook.com Link preview, safety check
Instagram N/A (in-app browser) Opens in WebView
Twitter/X t.co URL shortening, safety check
LinkedIn lnkd.in URL shortening
Slack (preview fetch only) Does not wrap user-visible link

Impact on Each Platform

Universal Links check the domain of the URL the user taps. If the tapped URL domain does not match the app's AASA file, the link opens in the browser.

Key behavior: iOS evaluates the initial URL, not the redirect destination. Even if the redirect lands on your Universal Links domain, it is too late.

Android App Links behave similarly: the app intercepts the URL only if the domain is verified. However, Android is slightly more forgiving:

  • Chrome on Android may follow 302 redirects and check the final URL.
  • Intent filters can match a broader set of URLs.
  • Some OEMs show a disambiguation dialog that includes the app even for redirected URLs.

Custom URL Schemes

Custom URL schemes (myapp://...) bypass the wrapping problem because they are not HTTP URLs. However, most ESPs and social platforms do not support custom URL schemes in links.

Solutions

Solution 1: Custom Tracking Domain

Configure your ESP to use a subdomain you control:

Default:  https://track.mailchimp.com/click?...
Custom:   https://links.yourdomain.com/click?...

Then configure AASA and assetlinks.json on links.yourdomain.com to associate it with your app.

ESP Custom Domain Support
SendGrid Branded links
Mailchimp Custom domains for tracking
Braze Custom link domains
HubSpot Custom tracking domains
Salesforce MC Authenticated sending domains

The ESP still wraps the link, but since the wrapped URL uses your domain, Universal Links activate on the wrapped URL itself.

Important: The AASA file must be served from the tracking subdomain, not just the main domain. If your ESP routes links.yourdomain.com to their servers, you need to configure the ESP to serve your AASA file on that domain (or use a CDN that serves both the ESP redirect and the AASA file).

Solution 2: Disable Click Tracking

Some ESPs let you disable click tracking for specific links:

<!-- SendGrid: Disable tracking for this link -->
<a href="https://app.example.com/products/123" clicktracking="off">
  View Product
</a>

<!-- Mailchimp: Use mc:disable-tracking -->
<a href="https://app.example.com/products/123" mc:disable-tracking>
  View Product
</a>

Trade-off: you lose click tracking data for those links. Use this only for deep links where app opens are more valuable than click data.

Solution 3: Redirect-Based Approach (Android Only)

For Android, you can rely on the redirect chain working:

  1. User taps https://track.esp.com/click?url=...
  2. ESP redirects to https://app.example.com/products/123
  3. Chrome checks App Links on the redirect target.
  4. App opens.

This does not work reliably on iOS because Safari does not activate Universal Links on redirects.

Solution 4: Two-URL Strategy

Use different URLs for iOS and Android:

<!-- Email template with conditional deep links -->
<!--[if iOS]-->
  <a href="https://links.yourdomain.com/products/123">View Product</a>
<!--[endif]-->
<!--[if Android]-->
  <a href="https://track.esp.com/click?url=https://app.example.com/products/123">View Product</a>
<!--[endif]-->

In practice, email clients do not support conditional rendering by OS. Instead, use a single link that handles both platforms:

function buildEmailDeepLink(route: string): string {
  // Use your custom tracking domain (works for both platforms)
  return `https://links.yourdomain.com${route}`;
}

Facebook and Instagram

Facebook wraps links with l.facebook.com and opens them in its in-app browser. Instagram opens all links in its in-app browser. Neither supports Universal Links.

Solution: Use a bounce page:

  1. Link goes to https://links.yourdomain.com/bounce?r=/products/123
  2. Bounce page detects the in-app browser.
  3. Shows a button: "Open in App"
  4. Button opens the same URL in the system browser (using a JavaScript workaround), which triggers the Universal Link.
// Bounce page: detect in-app browser and break out
function openInSystemBrowser(url) {
  // Safari on iOS: use window.open
  if (/iPhone|iPad/.test(navigator.userAgent)) {
    window.open(url, '_blank');
    return;
  }
  // Android: use Intent URL
  if (/Android/.test(navigator.userAgent)) {
    window.location.href = `intent://${new URL(url).host}${new URL(url).pathname}#Intent;scheme=https;end`;
    return;
  }
  // Fallback
  window.location.href = url;
}

Twitter/X

Twitter wraps all links with t.co. The t.co redirect happens server-side, so the user's browser receives a 301 redirect to the original URL. On Android, this usually works (Chrome follows the redirect). On iOS, it sometimes works if the redirect is fast enough, but it is unreliable.

Solution: Accept that Twitter links may open the web fallback for some iOS users. Ensure the web fallback has a clear "Open in App" button.

URL Shorteners

The Problem

URL shorteners (Bitly, Rebrandly, TinyURL) are redirects. They suffer from the same issues as ESP link wrapping.

Short URL:    https://bit.ly/abc123
Redirects to: https://app.example.com/products/123

The Solution

Use your own link shortening domain with AASA and assetlinks.json:

Your short URL:  https://l.yourdomain.com/abc123
Resolves to:     https://app.example.com/products/123

Configure l.yourdomain.com as a Universal Links domain. When the user taps the short URL, iOS checks l.yourdomain.com for AASA and opens the app. No redirect needed because the short URL domain itself is associated with your app.

Checklist

Test Expected Result
Send email with deep link via ESP, tap on iOS App opens (if using custom tracking domain)
Send email with deep link via ESP, tap on Android App opens
Share link on Facebook, tap in Facebook app Bounce page appears, "Open in App" works
Share link via Twitter/X, tap the t.co link App opens (Android) or web fallback (iOS)
Use your short URL domain App opens on both platforms
Use third-party shortener (bit.ly) Web fallback opens (expected)

Tolinku provides a dedicated link domain with AASA and assetlinks.json pre-configured, solving the link wrapping problem for custom tracking domains. See the deep linking documentation for setup instructions.

For QR codes and short links, see QR codes and short links for mobile apps. For troubleshooting, see common deep linking challenges and how to solve them.

Get deep linking tips in your inbox

One email per week. No spam.

Ready to add deep linking to your app?

Set up Universal Links, App Links, deferred deep linking, and analytics in minutes. Free to start.