title: iOS Associated Domains - subdomains seems to be ignored
body: <p>I have two build configurations: <em>App</em> and <em>App Stage</em>. </p>
  
  <p>Each configuration has different <code>Associated Domains</code> configured: <em>app.mydomain.com</em> and <em>app-stage.mydomain.com</em>. </p>
  
  <p>Of course, each website exposes different <code>apple-app-site-association</code> files: <em>app.mydomain.com/apple-app-site-association</em> and <em>app-stage.mydomain.com/apple-app-site-association</em> (HTTP 200, without .json extension, etc.).</p>
  
  <p>The problem is that only first registered domain (unfortunately it's Stage) is working properly. When I have both apps installed, each deep link (<em>app.mydomain.com/home</em> and <em>app-stage.mydomain.com/home</em>) opens the App Stage. When I have only App Sage installed, also both links open it. When I have only App installed none link is working. <strong>It looks like the subdomain of <code>Associated Domains</code> is ignored</strong> and only <em>mydomain.com</em> is taken into account.</p>
  
  <p>I assume that build configurations are defined correctly because I'm also differentiating other settings like Facebook, Google and others.</p>
  
  <p>Have you ever encountered a similar problem? Is it allowed to use different subdomains of the same domain for the <code>Associated Domains</code> usage?</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>Following @clayjones94 instructions, I checked whether each app downloads a correct JSON file using Charles Proxy. <strong>I found out that that App Stage is fetching the correct file, while App doesn't fetch any file.</strong> </p>
  
  <p>I have also edited URL in <em>app-stage.mydomain.com/apple-app-site-association</em> HTTP request in Charles to make sure that <em>app.mydomain.com/apple-app-site-association</em> returns the correct JSON. When I removed <code>-stage</code> from the URL and repeated the call it has fetched a different JSON file, so I confirmed that the backend is working correctly for both configurations.</p>
  
  <p>First I thought that my build configurations were incorrect. So I decided to replace App's <code>applinks:app.mydomain.com</code> associated domain with Stage's <code>applinks:app-stage.mydomain.com</code> to see if App configuration is able to fetch App Stage file. It worked, the App had downloaded App Stage's JSON file. Again, <strong>it looks like the subdomain of <code>Associated Domains</code> is ignored</strong> and only first registered subdomain is taken into account.</p>