<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 7.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "BundleResources",
  "identifier" : "/documentation/BundleResources/applinks",
  "metadataVersion" : "0.1.0",
  "role" : "Object",
  "symbol" : {
    "kind" : "Object",
    "modules" : [
      "Bundle Resources"
    ],
    "preciseIdentifier" : "ul:applinks"
  },
  "title" : "applinks"
}
-->

# applinks

The root object for a universal links service definition.

```
object applinks
```

## Overview

Use this object to define the universal links you want to associate with your domain.

The object contains these keys:

- `defaults`: The global pattern-matching settings to use as defaults for all universal links in the domain.
- `details`: An array of `Details` objects that define the apps and the universal links they handle for the domain.
- `substitutionVariables`: Custom variables to use for simplifying complex pattern matches. Each name acts as a variable that the system replaces with each string in the associated string array.

Add the JSON code to your `apple-app-site-association` file along with the app identifiers for the apps that you designate to handle universal links for your domain.
This example code shows a universal links section in an association file:

```javascript
"applinks": {
  "details": [
    {
      "appIDs": [ "ABCDE12345.com.example.app", "ABCDE12345.com.example.app2" ],
      "components": [
        {
          "#": "no_universal_links",
          "exclude": true,
          "comment": "Matches any URL whose fragment equals no_universal_links and instructs the system not to open it as a universal link"
        },
        {
          "/": "/buy/*",
          "comment": "Matches any URL whose path starts with /buy/"
        },
        {
          "/": "/help/website/*",
          "exclude": true,
          "comment": "Matches any URL whose path starts with /help/website/ and instructs the system not to open it as a universal link"
        },
        {
          "/": "/help/*",
          "?": { "articleNumber": "????" },
          "comment": "Matches any URL whose path starts with /help/ and that has a query item with name 'articleNumber' and a value of exactly 4 characters"
        }
      ]
    }
  ]
}
```

## Topics

### Universal links definitions

[`applinks.Details`](/documentation/BundleResources/applinks/Details-swift.dictionary)

A list of apps and the universal links they handle for a domain.

### Pattern-matching defaults

[`applinks.Defaults`](/documentation/BundleResources/applinks/Defaults-swift.dictionary)

An object that defines the default settings to use for universal links pattern matching.

### Substitution variables

[`applinks.SubstitutionVariables`](/documentation/BundleResources/applinks/SubstitutionVariables-swift.dictionary)

A list of named strings and an associated array of string values that define custom substitution variables to use for URL pattern matching.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)