Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions hub/apps/develop/launch/web-to-app-linking.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,21 @@ Create a JSON file (without the .json file extension) named **windows-app-web-li

Windows will make an https connection to your website and will look for the corresponding JSON file on your web server.

### Subdomain support

If your app manifest includes both a main domain (for example, `example.com`) and wildcard subdomains (for example, `*.example.com`), you need to add the `allowSubdomains` field to your JSON file to enable subdomain linking. Without this field, links to subdomains will open in the browser instead of your app.

``` JSON
[{
"packageFamilyName" : "Your app's package family name, e.g MyApp_9jmtgj1pbbz6e",
"paths" : [ "*" ],
"excludePaths" : [ "/news/*", "/blog/*" ],
"allowSubdomains" : true
}]
```

When `allowSubdomains` is set to `true`, links to subdomains like `subdomain.example.com/path` will correctly open in your app instead of the browser.

### Wildcards

The JSON file example above demonstrates the use of wildcards. Wildcards allow you to support a wide variety of links with fewer lines of code. Web-to-app linking supports two types of wildcards in the JSON file:
Expand Down Expand Up @@ -90,6 +105,9 @@ If you have two apps that you would like to link to your website, list both of t
}]
```

> [!NOTE]
> If your apps need to support subdomains, add `"allowSubdomains": true` to each app entry in the JSON file.

To provide the best experience for your users, use exclude paths to make sure that online-only content is excluded from the supported paths in your JSON file.

Exclude paths are checked first and if there is a match the corresponding page will be opened with the browser instead of the designated app. In the example above, ‘/news/\*’ includes any pages under that path while ‘/news\*’ (no forward slash trails 'news') includes any paths under ‘news\*’ such as ‘newslocal/’, ‘newsinternational/’, and so on.
Expand Down