From d7941427df50af3eacd86c6db00b9e523470ea4d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 26 Aug 2025 16:53:41 +0000 Subject: [PATCH 1/2] Initial plan From 4d987643a9ccf93d75daac256a66a2593fcfbb36 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 26 Aug 2025 17:00:28 +0000 Subject: [PATCH 2/2] Add documentation for allowSubdomains field in web-to-app linking JSON Co-authored-by: alvinashcraft <73072+alvinashcraft@users.noreply.github.com> --- hub/apps/develop/launch/web-to-app-linking.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/hub/apps/develop/launch/web-to-app-linking.md b/hub/apps/develop/launch/web-to-app-linking.md index c239238197..c2ed32034d 100644 --- a/hub/apps/develop/launch/web-to-app-linking.md +++ b/hub/apps/develop/launch/web-to-app-linking.md @@ -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: @@ -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.