In our iOS app we have added example.com in associated domains from the very beginning With no AASA file hosted at example.com domain
Now we need a subdomain app.example.com to be intercepted in our app, so for the same, we are thinking to host AASA at app.example.com and add app.example.com in associated domains too.
so my question is will hosting AASA at sub domain works? If yes, will it affect older apps where app.example.com is not handled.
In short we only want the links with app.example.com to be open in our app not the example.com links
@shivamprajapati @shivamprajapato to clarify:
You’ll find this about domain and subdomains: Make sure your domains and AASA file paths match. To match a root domain and all subdomains with a wildcard, an AASA file should be hosted at: https://example.com/.well-known/apple-app-site-association This will only work with the root domain of applinks:example.com and subdomains that are matched with the wildcard applinks:*.example.com. This will not work with specific subdomains like applinks:www.example.com or applinks:foo.example.com.
To match a specific subdomain, an AASA file should be hosted at: https://www.example.com/.well-known/apple-app-site-association This will only work with applinks:www.example.com. Each specific subdomain in your applinks should have its own matching AASA file path. Based on the information provided, you will need to host two AASA file paths for the domain and the subdomain.
Hopefully this helps.
Rico
WWDR | DTS | Software Engineer