Apple App Site Association Generator
- Runs in your browser
- Nothing uploaded
- No sign-up
Ten characters, from Membership details in your developer account.
One per line. The Team ID is prefixed for you.
For the entitlement lines and the checklist. Not requested.
First match wins. * any run of characters, ? one character, ?* at least one. A query as name=pattern, joined with &.
- Rule 1
- Rule 2
- Rule 3
Optional. Writes the appclips service.
{
"applinks": {
"details": [
{
"appIDs": [
"ABCDE12345.com.example.recipes"
],
"components": [
{
"/": "/help/*",
"exclude": true,
"comment": "Help pages stay in Safari."
},
{
"/": "/recipes/*",
"comment": "Open recipes in the app."
},
{
"/": "/search",
"?": {
"q": "?*"
},
"comment": "A search with a non-empty query."
}
]
}
]
},
"webcredentials": {
"apps": [
"ABCDE12345.com.example.recipes"
]
}
}applinks:example.com webcredentials:example.com
Add ?mode=developer to a line on a development build to fetch the file straight from your server, bypassing Apple’s CDN.
- · https://example.com/.well-known/apple-app-site-association — no .json extension
- · HTTPS with a valid certificate, and no redirect (a 301 or 302 breaks it)
- · One copy on every domain and subdomain the entitlement lists
- · Reachable by Apple’s CDN from every IP — no geo-blocking or bot walls
- · Served as application/json (recommended)
{ "applinks": { "details": [ { "appIDs": [ "TEAMID.bundle.id" ], "components": [ { "/": "/path/*", "exclude": false } ] } ] } }
The page never requests your domain, so it cannot see a redirect, a certificate problem or what Apple’s CDN has cached — use the commands under the result for that.
Updated · DRISH LABS
How do you create an apple-app-site-association file for Universal Links?
An apple-app-site-association file lists your Team ID and bundle IDs with the URL rules that open in the app. It goes at /.well-known/apple-app-site-association on every domain and subdomain the entitlement lists, served over HTTPS with a valid certificate, no redirect and no file extension. The first rule that matches a link wins, so exclusions must come before the broader rules they carve out of.
How it works
- Enter the Team ID and the bundle IDs of the apps that may open links on this domain. Apple calls the pair the application identifier: TEAMID.com.example.app.
- List the URL rules in order. Each rule matches a path, and optionally a query and a fragment, with Apple’s wildcards: * for any run of characters, ? for exactly one, ?* for at least one. Tick Exclude for URLs that must stay in the browser. The first rule that matches wins, so put exclusions above the broader rules they carve out of.
- Tick shared web credentials to let the app fill passwords saved for the website, and add an App Clip bundle ID if the domain launches one. The file and the matching entitlement lines are written as you go.
- Upload the file to /.well-known/apple-app-site-association on every domain and subdomain the entitlement lists, over HTTPS, with no redirect and no file extension. Or switch to Check and paste a file you already have to test it against Apple’s format.
How the system matches a link
Each components object can test the URL’s path (/), query (?) and fragment (#); a URL matches when every component the object names matches, and a component it leaves out matches anything. The system walks the components array top to bottom and stops at the first match — if that object has exclude: true the link opens in the browser, otherwise in the app. Matching is case-sensitive unless caseSensitive is set to false.
match(url) = first c in components where path ⊨ c["/"] ∧ query ⊨ c["?"] ∧ fragment ⊨ c["#"] → exclude ? browser : app
When you need it
- Universal Links that open the browser instead
- Paste the live file into Check. A rule order where a broad /* sits above an exclusion, an app ID with the bundle ID but no Team ID, or a mix of the new components format with the old paths format all stop links opening — each is flagged. Apple’s technote names the mixing in particular.
- Keeping some pages in Safari
- Help articles, checkout or a marketing page that the app does not show belong in the browser. Add them as Exclude rules above the rule that sends everything else to the app.
- Shared passwords between site and app
- Tick shared web credentials and the app can offer passwords saved in Safari for the same domain. The entitlement needs a webcredentials: line for each domain too; the tool writes it.
- Testing before the site is public
- Apple’s CDN fetches the file, so a staging server it cannot reach never verifies. Add ?mode=developer to the entitlement line on a development build to fetch the file straight from the server.
Questions
Where does the apple-app-site-association file go?
At https://your-domain/.well-known/apple-app-site-association — that exact name, with no .json extension, served over HTTPS with a valid certificate and no redirect. Every subdomain in the entitlement needs its own copy.
What content type should it be served with?
Serve it as application/json. Apple’s current pages state the HTTPS, certificate and no-redirect rules but not a content type; application/json is the correct type for the body and the one Apple’s earlier guidance named, so it is the safe choice.
Why aren’t my Universal Links opening the app?
The usual causes: a redirect on the file’s URL; a domain Apple’s CDN cannot reach from every IP; an app ID missing its Team ID; a rule order where the first match is an exclusion; or the entitlement missing the domain. Also, a link tapped on a page of the same domain in Safari stays in Safari by design.
How long until a change to the file takes effect?
Apple’s CDN requests the file within 24 hours, and devices check for an update roughly once a week after the app is installed. There is no way to invalidate the CDN; reinstalling the app fetches the current version.
What is the difference between appID and appIDs, or paths and components?
appID with paths is the older format; appIDs with components is the current one, which adds query and fragment matching, exclusions and comments. Apple’s technote warns against mixing the two in one file.
How do I test the file on a Mac?
Run sudo swcutil dl -d your-domain to check that it downloads, and sudo swcutil verify -d your-domain -j file.json -u https://your-domain/path to test a URL against your rules. curl -v on the file’s URL shows whether there is a redirect.
Is anything I enter sent anywhere?
No. The file is written and checked in the page. The tool never requests your domain; nothing is uploaded or stored.
Keep going
Info.plist Permission Strings
Purpose strings for camera.
Free toolPrivacy Manifest Generator
PrivacyInfo.xcprivacy from ticked boxes.
Free toolApp Store Character Counter
Every App Store listing field against Apple’s limit.
Free tool