Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS Universal Links and URL Shorteners

We have recently begin to encounter issues with our Universal Link implementation when the UL is accessed via a shortened goo.gl URL.

This Works: https://site.domain.com/Deep/Link

This does not: https://goo .gl/fake -> 302 Redirect -> https://site.domain.com/Deep/Link

Is anyone else experiencing the same thing?

Note: I had to break up the shortened Google URL to keep StackOverflow's editor from yelling at me.

like image 773
Matt Baker Avatar asked Mar 25 '16 18:03

Matt Baker


1 Answers

Universal Links are triggered by the URL that is being accessed, and are ignored if a redirect is not triggered by explicit user action. Since goo.gl isn't registered to your app (and cannot be, since you don't control it), burying your URL behind a shortened link is bypassing Universal Link detection for the destination domain.

There is no good workaround for this on goo.gl. The best option is to set up a URL shortener on a custom domain that you CAN register with your app for Universal Links. Alternatively, Branch.io (full disclosure: I'm on the Branch team) or Firebase Dynamic Links could handle this for you, since both essentially set up a custom link shortener on a domain they control for Universal Links on your behalf.

like image 135
Alex Bauer Avatar answered Sep 28 '22 17:09

Alex Bauer