Meta tags can be added to your webpages in order to tell the app which views should be opened when opening a url to your domain in the app instead of a web browser.


The following HTML tags must be added to the HEAD section. 


<meta property="al:ios:app_name" content="Store Name">

<meta property="al:ios:app_store_id" content="{appstore_id*}">

<meta property="al:ios:url" content="{storename}://categories/432/">
HTML

The al:ios:url meta tag contains the deeplink. This is used by the app in order to know what view within the app needs to be opened for this webpage.


Details on how to construct a deeplink can be found here.


Note that if you do not want a webpage to be opened in the app then the al:ios:url meta tag should not be included on the page. If the webpage does not contain the al:ios:url meta tag then a popup will be shown to the user informing them that the content could not be found. The user will then have the option to proceed to the app or continue to the web browser insteadbut then immediately direct the user to the default web browser of the device.

When the app requests the webpage client side javascript will not be run. This means that adding the meta tag with client javascript will not work. It needs to be added by the server.


Also note that the app supports displaying custom web content through the use of content extensions. If you have a custom webpage that you wish to display in the app then the content extension deeplink type should be used.


* To be able to find the App Store ID, the app needs to be live in the App Store. When that is live, you can extract the ID from the app URL. When the URL is https://itunes.apple.com/nl/app/scotch-soda/id1062215070?mt=8, the app ID can be found at the end of the URL. In this case: 1062215070.