Universal Links for Mobile Apps: Connecting Users to Your Content

Written by: on May 19, 2016

The world wide web has forever changed the way we find information, and mobile apps have invaded this world of content discovery. No longer do you need to visit a website to find a book or purchase tickets as most of this content is readily available on a mobile app.

Your users deserve the best experience possible, and that means easier access to relevant content, typically using a native app. If a user has your mobile app installed, then that should take priority over going to your website. If a user does not have your mobile app installed, then any link given should fall back to your website.

Universal links strengthen the relationship between your website and your mobile app, and allow your users to be taken directly where they want to go.

What are universal links?

If you have a piece of content you want to share, like a news article or a blog, you need an identifier to easily pass along. For the web, this identifier is the URL (Uniform Resource Locator) and is typically in the form of http://yourwebsite.com/path/to/content. What if the same URLs could be used to route users to the same content in a mobile app?

A universal link is the same web URL, but now your mobile app can handle it and redirect to the appropriate place in your app. After you have implemented universal links, iOS and Android will automatically open your app if they encounter a universal link, such as pasting it into a web browser or tapping a hyperlink in a different app. In Android, universal links are called “app links”.

Universal links or deep links?

Traditional deep links use custom URL schemes such as my-app://action?parameter=value, which then redirect to the corresponding view in the app. These types of deep links do not always work cross-platform and fail if the user does not have the app installed.

Universal links work the same as custom URL schemes, but they use real web addresses instead. They are still deep links and handled by the app in the same way. In fact if your app uses deep links, then you can most likely reuse a lot of the same code to handle universal links.

Your app needs universal links.

There are many benefits to using universal links and users will start to expect these features as they become more common.

Web Fall-Back. One of the biggest advantages of using universal links is the fall back to web. If a user encounters a universal link and doesn’t have your app installed, then they will be gracefully redirected to the correct place on your website instead.

Simple. Use one URL for both your app and website.

Inter-App Communication. Other apps can communicate with your app using universal links, without needing to know if your app is installed.

Search Indexing. Using universal links allows search engines like Google and Apple’s Spotlight to easily index your content and direct users to your app.

Implementation of universal links

Adding universal links is different for iOS and Android, but the steps are generally the same:

  1. Configure your website. Your website will need some metadata to instruct the mobile system how the content is organized.
  2. Configure your app. Your app will need to be able to handle universal links and redirect the user to the appropriate screen in the app based on the content of the universal link.
  3. Test. As with any new feature, you will need to test your implementation to make sure the links are working correctly.

Here are some resources to help you get started implementing universal links:

iOS: https://developer.apple.com/library/ios/documentation/General/Conceptual/AppSearch/UniversalLinks.html

Android: https://developer.android.com/training/app-links/index.html

Limitations of universal links.

There exist a few limitations for universal links you should be aware of:

  • Fragment identifiers (#) and query parameters (?) are not supported by universal links.
  • Universal links only work with iOS 9 or greater and Android M or greater.
  • A website is required for your app to use universal links, but this can also be a major benefit for your users.
  • Implementation can be complex, as your website needs to be configured in very specific ways for universal links to work.

Resources

https://developer.apple.com/library/ios/documentation/General/Conceptual/AppSearch/UniversalLinks.html

https://developer.android.com/training/app-links/index.html

http://blog.bitly.com/post/129222131344/5-things-you-need-to-know-about-ios-9-and

http://blog.hokolinks.com/android-m-app-links-implementation-drawbacks/

Jeremiah Gage

Jeremiah Gage

Jeremiah is a software engineer who specializes in iOS development. He moved to Denver, Colorado in 2014 to work for POSSIBLE Mobile. Jeremiah is also an avid billiards (pool) player and instructor.
Article


Add your voice to the discussion: