AASA CDN intermittently times out / requests wrong path (/apple-app-site-association vs /.well-known/...)

Hi Everyone,

We are tinkering on an App using associated domains with the working name "uff2.de". We have configured our Webserver (Caddy) to restrict all URIs except for /.well-known/apple-app-site-association using Www-Authenticate.

Recently our associated domains started becoming flaky, which we believe has to do with requests from Apple’s CDN failing: The following example uses a query string to trigger a fresh request by Apple’s CDN.

curl -sD - "https://app-site-association.cdn-apple.com/a/v1/uff2.de?foobar" -o /dev/null
HTTP/1.1 404 Not Found
Server: AppleHttpServer/7b3d349ae60c243cdd677edbde3e93e460f75820
Date: Sat, 05 Sep 2026 12:01:16 GMT
Content-Type: text/plain; charset=utf-8
Content-Length: 10
Apple-Failure-Details: {"cause":"Connection timed out"}
Apple-Failure-Reason: SWCERR00301 Timeout
Apple-From: https://uff2.de/.well-known/apple-app-site-association
Apple-Try-Direct: true
Cache-Control: max-age=3600,public
Vary: Accept-Encoding
X-B3-TraceId: 457b6172513a930f
Strict-Transport-Security: max-age=31536000
Age: 32
Via: https/1.1 defra2-vp-vst-018.ts.apple.com (acdn/331.16659), https/1.1 defra2-vp-vfe-016.ts.apple.com (acdn/331.16659), https/1.1 gbslo5-xdc-mx-020.ts.apple.com (acdn/331.16659), https/1.1 uklon5-edge-fx-024.ts.apple.com (acdn/331.16659)
X-Cache: miss, miss, miss, miss
CDNUUID: df5ac203-4188-4722-8bbc-68e9d9fd0b33-1118024500
Connection: keep-alive

To investigate this further we enabled access logging and are seeing the following request that is blocked by us:

2026/09/05 12:01:16.824	INFO	http.log.access.log0	handled request	{"request": {"remote_ip": "57.103.82.202", "remote_port": "48366", "client_ip": "57.103.82.202", "proto": "HTTP/1.1", "method": "GET", "host": "uff2.de", "uri": "/apple-app-site-association", "headers": {"User-Agent": ["AASA-Bot/1.0.0"], "Accept-Encoding": ["gzip"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "", "server_name": "uff2.de"}}, "bytes_read": 0, "user_id": "", "duration": 0.000083782, "size": 0, "status": 401, "resp_headers": {"Server": ["Caddy"], "Alt-Svc": ["h3=\":443\"; ma=2592000"], "Www-Authenticate": ["Basic realm=\"restricted\""]}}

But this seems to be the wrong URI (/apple-app-site-association instead of /.well-known/apple-app-site-association). When swapping ?foobar for other query strings like ?foobar2 or ?foobar3, some requests randomly work and some don’t. We’re also seeing flakiness for the same path (both with and without a query string) across time, but this is harder to test due to caching.

For reference this is a correct request:

2026/09/05 17:54:26.075	INFO	http.log.access.log0	handled request	{"request": {"remote_ip": "57.103.81.17", "remote_port": "8692", "client_ip": "57.103.81.17", "proto": "HTTP/1.1", "method": "GET", "host": "uff2.de", "uri": "/.well-known/apple-app-site-association", "headers": {"User-Agent": ["AASA-Bot/1.0.0"], "Accept-Encoding": ["gzip"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "", "server_name": "uff2.de"}}, "bytes_read": 0, "user_id": "", "duration": 0.000088472, "size": 469, "status": 200, "resp_headers": {"Accept-Ranges": ["bytes"], "Content-Length": ["469"], "Server": ["Caddy"], "Alt-Svc": ["h3=\":443\"; ma=2592000"], "Vary": ["Accept-Encoding"], "Etag": ["\"dgrdbiykgv3ad1\""], "Content-Type": [], "Last-Modified": ["Sun, 01 Mar 2026 10:19:41 GMT"]}}

Did we misread the documentation and should also serve /apple-app-site-association? Why would requests sometimes be made to /.well-known/apple-app-site-association and sometimes to /apple-app-site-association?

Thank you!

Bellow I also have an example without the query string:

curl -sD - "https://app-site-association.cdn-apple.com/a/v1/uff2.de" -o /dev/null
HTTP/1.1 404 Not Found
Server: AppleHttpServer/7b3d349ae60c243cdd677edbde3e93e460f75820
Date: Sat, 05 Sep 2026 18:54:00 GMT
Content-Type: text/plain; charset=utf-8
Content-Length: 10
Apple-Failure-Details: {"cause":"Connection timed out"}
Apple-Failure-Reason: SWCERR00301 Timeout
Apple-From: https://uff2.de/.well-known/apple-app-site-association
Apple-Try-Direct: true
Cache-Control: max-age=3600,public
Vary: Accept-Encoding
X-B3-TraceId: 02d1d89c44e0c48c
Strict-Transport-Security: max-age=31536000
Age: 32
Via: https/1.1 defra2-vp-vst-006.ts.apple.com (acdn/331.16659), https/1.1 defra2-vp-vfe-017.ts.apple.com (acdn/331.16659), https/1.1 defra2-xdc-mx-006.ts.apple.com (acdn/331.16659), https/1.1 defra1-edge-fx-019.ts.apple.com (acdn/331.16659)
X-Cache: hit-stale, hit-stale, hit-stale, miss
CDNUUID: d2fabf15-4734-4ee7-880c-2018498293a7-1153445817
Connection: keep-alive

Access Log Entry:

2026/09/05 18:54:00.180	INFO	http.log.access.log0	handled request	{"request": {"remote_ip": "57.103.82.166", "remote_port": "1036", "client_ip": "57.103.82.166", "proto": "HTTP/1.1", "method": "GET", "host": "uff2.de", "uri": "/apple-app-site-association", "headers": {"User-Agent": ["AASA-Bot/1.0.0"], "Accept-Encoding": ["gzip"]}, "tls": {"resumed": false, "version": 772, "cipher_suite": 4865, "proto": "", "server_name": "uff2.de"}}, "bytes_read": 0, "user_id": "", "duration": 0.000074622, "size": 0, "status": 401, "resp_headers": {"Server": ["Caddy"], "Alt-Svc": ["h3=\":443\"; ma=2592000"], "Www-Authenticate": ["Basic realm=\"restricted\""]}}

Thanks for the post.

I would recommend to go over the troubleshooting to make sure you have an app that at installation time make the request to start syncing with the Apple servers

TN3155: Debugging universal links | Apple Developer Documentation

Can you provide the app configuration and the swcutil file registration?

Thanks

Albert  WWDR

Re: DTS Engineer's answer

Thanks for your response.

It was while working through these debug steps that we first noticed the CDN issue.

As this is an intermittent issue, we are confident that everything is configured correctly on the app side and the AASA file is valid. Our app is configured with the following entitlement:

<key>com.apple.developer.associated-domains</key>
<array>
    <string>applinks:*.uff2.de</string>
</array>

swcutil also confirms that our target URL matches that domain using a copy of the file hosted on our server:

sudo swcutil verify -d '*.uff2.de' -j ./apple-app-site-association.json -u https://testa.uff2.de/s/ABC12345
{ s = applinks, a = JQWD9LFG28.de.uff2.app, d = *.uff2.de }: Pattern "https://testa.uff2.de/s/ABC12345" matched.

Here is the relevant section of the swcutil_show.txt file you asked for (pulled from a phone during a failing interval):

--------------------------------------------------------------------------------
Service:              applinks
App ID:               JQWD9LFG28.de.uff2.app
App Version:          1.0
App PI:               <LSPersistentIdentifier 0xcc0ca1180> { v = 0, t = 0x8, u = 0x1d7c, db = 294E5FAA-C50D-4B0B-BA3C-E38A60A17A0E, {length = 8, bytes = 0x7c1d000000000000} }
Domain:               *.uff2.de
User Approval:        unspecified
Site/Fmwk Approval:   unspecified
Flags:                
Last Checked:         2026-09-02 20:22:03 +0000
Next Check:           2026-09-02 23:41:53 +0000
Error:                Error Domain=SWCErrorDomain Code=7 "SWCERR00301 Timeout -- {"cause":"Connection timed out"}" UserInfo={Line=275, Function=-[SWCDownloader URLSession:dataTask:didReceiveResponse:completionHandler:], NSDebugDescription=SWCERR00301 Timeout -- {"cause":"Connection timed out"}, UnderlyingError=Error Domain=HTTP Code=404 "(null)" UserInfo={Line=275, Function=-[SWCDownloader URLSession:dataTask:didReceiveResponse:completionHandler:]}}
Retries:              1
--------------------------------------------------------------------------------

Site/Fmwk Approval: unspecified prompted us to look into the requests to the Apple-CDN, which is when we noticed that for every failing CDN requests our servers got a request to /apple-app-site-association instead of a request to /.well-known/apple-app-site-association.

@floriantfuhrmann Thank for the reply, given your configuration on your last message, you AASA should be located at :

 curl -v http://uff2.de/.well-known/apple-app-site-association 
* Host uff2.de:80 was resolved.
* IPv6: 2a0c:75c0:1:170::123
* IPv4: 45.88.108.146
*   Trying [2a0c:75c0:1:170::123]:80...
*   Trying 45.88.108.146:80...
* Connected to uff2.de (45.88.108.146) port 80
> GET /.well-known/apple-app-site-association HTTP/1.1
> Host: uff2.de
> User-Agent: curl/8.7.1
> Accept: */*
> 
* Request completely sent off
< HTTP/1.1 308 Permanent Redirect
< Connection: close
< Location: https://uff2.de/.well-known/apple-app-site-association
< Server: Caddy
< Date: Tue, 08 Sep 2026 17:16:21 GMT
< Content-Length: 0
< 

The Root Domain is NOT included: A wildcard like *.uff2.de matches subdomains, but it does not match the root domain (uff2.de). If you want links to https://uff2.de to also open your app,

On your configuration why don’t you used?

<string>applinks:uff2.de</string> <!-- Add this for the root domain -->

You can use a wildcard () in your app links, exactly as you have it in your snippet (applinks:.uff2.de).

As mentioned before, *.uff2.de will not match uff2.de. You must include applinks:uff2.de separately if you want the root domain to work.

Where is the AASA file located? How does the CDN know?

Albert  WWDR

Re: DTS Engineer's answer

Thanks for your response. Actually, we don't want the root domain to open the app. Instead any subdomain with the path /s/<ID> and /o/<ID> should open the app. But again, this works correctly intermittently.

curl -v https://uff2.de/.well-known/apple-app-site-association (Note the https instead of http) returns the AASA file for me. According to Supporting associated domains https should be used.

So yes, while *.uff2.de does not match uff2.de this is not actually our problem. Our AASA file is only additionally hosted on the root uff2.de domain since according to this stackoverflow answer this is needed for the wildcards to work.

This link for example should match: https://testa.uff2.de/s/ABC12345

So to answer your questions, the AASA file is located at: https://uff2.de/.well-known/apple-app-site-association, https://testa.uff2.de/.well-known/apple-app-site-association and many other subdomains eventually, but can be tested with these 2.

How does the CDN know?

I think a phone will trigger a request when coming across a subdomain.

PS: We did more research and probably discovered the reason for the /apple-app-site-association request. If the first request fails, this seems to be a fallback since iOS 9.3. But weirdly, if this request succeeds, why does the first one time out?

You are correct is

curl -v https://uff2.de/.well-known/apple-app-site-association

If you want https://testa.uff2.de you can add the AASA file into

https://testa.uff2.de/.well-known/apple-app-site-association

So its easier to see the path and the sync with the CDN.

Albert  WWDR

@floriantfuhrmann I don't understand your request to the CDN timeout? can you provide the output?

curl -v https://app-site-association.cdn-apple.com/a/v1/testa.uff2.de
* Host app-site-association.cdn-apple.com:443 was resolved.
* IPv6: 2620:149:a21:f000::147, 2620:149:a00:f000::159, 2620:149:a00:f000::132, 2620:149:a0c:f100::4, 2620:149:a0c:f000::7, 2620:149:a0d:f000::134, 2620:149:a0d:f000::144, 2620:149:a21:f000::145
* IPv4: 17.253.9.134, 17.253.9.132, 17.253.83.136, 17.253.5.137, 17.253.5.150, 17.253.17.203, 17.253.17.207, 17.253.83.199
*   Trying [2620:149:a21:f000::147]:443...
* Connected to app-site-association.cdn-apple.com (2620:149:a21:f000::147) port 443
* ALPN: curl offers h2,http/1.1
* (304) (OUT), TLS handshake, Client hello (1):
*  CAfile: /etc/ssl/cert.pem
*  CApath: none
* (304) (IN), TLS handshake, Server hello (2):
* (304) (IN), TLS handshake, Unknown (8):
* (304) (IN), TLS handshake, Certificate (11):
* (304) (IN), TLS handshake, CERT verify (15):
* (304) (IN), TLS handshake, Finished (20):
* (304) (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / AEAD-CHACHA20-POLY1305-SHA256 / [blank] / UNDEF
* ALPN: server accepted http/1.1
* Server certificate:
*  subject: C=US; ST=California; O=Apple Inc.; CN=app-site-association.cdn-apple.com
*  start date: Aug  4 23:51:50 2026 GMT
*  expire date: Oct 28 19:40:30 2026 GMT
*  subjectAltName: host "app-site-association.cdn-apple.com" matched cert's "app-site-association.cdn-apple.com"
*  issuer: C=US; O=Apple Inc.; CN=Apple Public Server ECC CA 1 - G1
*  SSL certificate verify ok.
* using HTTP/1.x
> GET /a/v1/testa.uff2.de HTTP/1.1
> Host: app-site-association.cdn-apple.com
> User-Agent: curl/8.7.1
> Accept: */*
> 
* Request completely sent off
< HTTP/1.1 200 OK
< Server: AppleHttpServer/7b3d349ae60c243cdd677edbde3e93e460f75820
< Date: Tue, 08 Sep 2026 20:43:13 GMT
< Content-Type: application/json
< Content-Length: 469
< Apple-From: https://testa.uff2.de/.well-known/apple-app-site-association
< Apple-Origin-Format: json
< Cache-Control: max-age=21600,public
< Vary: Accept-Encoding
< X-B3-TraceId: f86a31879d1dbcec
< Strict-Transport-Security: max-age=31536000
< Age: 10
< Via: https/1.1 usmsc2-3p-pst-019.ts.apple.com (acdn/331.16659), https/1.1 usmsc2-3p-pac-019.ts.apple.com (acdn/331.16659), https/1.1 usmsc2-3p-pfe-011.ts.apple.com (acdn/331.16659), https/1.1 uslax1-edge-mx-013.ts.apple.com (acdn/331.16659), https/1.1 uslax1-edge-fx-036.ts.apple.com (acdn/331.16659)
< X-Cache: miss, miss, miss, miss, miss
< CDNUUID: 9743607f-4669-4b97-929d-b09b973b8d8e-527421240
< Connection: keep-alive
< 
{
  "applinks": {
      "details": [
           {
             "appIDs": [ "JQWD9LFG28.de.uff2.app" ],
             "components": [
               {
                  "/": "/s/*",
                  "comment": "Matches any URL with a path that starts with /s/."
               },
               {
                  "/": "/o/*",
                  "comment": "Matches any URL with a path that starts with /o/."
               }
             ]
           }
       ]
   }
}

@floriantfuhrmann instead of using parameters you can disable the cache

curl -H 'Cache-Control: no-cache' https://app-site-association.cdn-apple.com/a/v1/testa.uff2.de
{
  "applinks": {
      "details": [
           {
             "appIDs": [ "JQWD9LFG28.de.uff2.app" ],
             "components": [
               {
                  "/": "/s/*",
                  "comment": "Matches any URL with a path that starts with /s/."
               },
               {
                  "/": "/o/*",
                  "comment": "Matches any URL with a path that starts with /o/."
               }
             ]
           }
       ]
   }
}

Please capture responses (curl -v) from the server without the parameters, just clean request and response and if one of the servers is having issues, there is a team that will like to identify so is important you provide the whole response and we can file a bug.

Once you open the bug report, please post the FB number here for my reference.

If you have any questions about filing a bug report, take a look at Bug Reporting: How and Why?

Albert  WWDR

Here is another example of a failing request to https://testa.uff2.de/.well-known/apple-app-site-association through Apple’s CDN:

curl -v https://app-site-association.cdn-apple.com/a/v1/testa.uff2.de
* Host app-site-association.cdn-apple.com:443 was resolved.
* IPv6: 2a01:b740:a06:f000::203, 2a01:b740:a05:0:17:253:254:5, 2a01:b740:a05:0:17:253:254:6, 2a01:b740:a06:f000::209, 2a01:b740:a30:f000::152, 2a01:b740:a02:f000::143, 2a01:b740:a02:f000::137, 2a01:b740:a30:f000::155
* IPv4: 17.253.37.197, 17.253.15.137, 17.253.37.204, 17.253.15.144, 17.253.53.137, 17.253.254.6, 17.253.254.9, 17.253.53.160
*   Trying [2a01:b740:a06:f000::203]:443...
* Connected to app-site-association.cdn-apple.com (2a01:b740:a06:f000::203) port 443
* ALPN: curl offers h2,http/1.1
* (304) (OUT), TLS handshake, Client hello (1):
*  CAfile: /etc/ssl/cert.pem
*  CApath: none
* (304) (IN), TLS handshake, Server hello (2):
* (304) (IN), TLS handshake, Unknown (8):
* (304) (IN), TLS handshake, Certificate (11):
* (304) (IN), TLS handshake, CERT verify (15):
* (304) (IN), TLS handshake, Finished (20):
* (304) (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / AEAD-CHACHA20-POLY1305-SHA256 / [blank] / UNDEF
* ALPN: server accepted http/1.1
* Server certificate:
*  subject: C=US; ST=California; O=Apple Inc.; CN=app-site-association.cdn-apple.com
*  start date: Aug  4 23:51:50 2026 GMT
*  expire date: Oct 28 19:40:30 2026 GMT
*  subjectAltName: host "app-site-association.cdn-apple.com" matched cert's "app-site-association.cdn-apple.com"
*  issuer: C=US; O=Apple Inc.; CN=Apple Public Server ECC CA 1 - G1
*  SSL certificate verify ok.
* using HTTP/1.x
> GET /a/v1/testa.uff2.de HTTP/1.1
> Host: app-site-association.cdn-apple.com
> User-Agent: curl/8.7.1
> Accept: */*
>
* Request completely sent off
< HTTP/1.1 404 Not Found
< Server: AppleHttpServer/7b3d349ae60c243cdd677edbde3e93e460f75820
< Date: Tue, 08 Sep 2026 20:46:23 GMT
< Content-Type: text/plain; charset=utf-8
< Content-Length: 10
< Apple-Failure-Details: {"cause":"Connection timed out"}
< Apple-Failure-Reason: SWCERR00301 Timeout
< Apple-From: https://testa.uff2.de/.well-known/apple-app-site-association
< Apple-Try-Direct: true
< Cache-Control: max-age=3600,public
< Vary: Accept-Encoding
< X-B3-TraceId: 5c7a524bb0bf3e27
< Strict-Transport-Security: max-age=31536000
< Expires: Tue, 08 Sep 2026 20:46:33 GMT
< Age: 737
< Via: http/1.1 defra2-vp-vst-019.ts.apple.com (acdn/331.16659), https/1.1 defra2-vp-vfe-016.ts.apple.com (acdn/331.16659), https/1.1 uklon6-edge-lx-001.ts.apple.com (acdn/331.16659), https/1.1 uklon6-edge-bx-021.ts.apple.com (acdn/331.16659)
< X-Cache: hit-fresh, miss, miss, miss
< CDNUUID: fab7275a-b44a-4b8e-823b-003dac048cc4-1461985252
< Connection: keep-alive
<
Not Found
* Connection #0 to host app-site-association.cdn-apple.com left intact
AASA CDN intermittently times out / requests wrong path (/apple-app-site-association vs /.well-known/...)
 
 
Q