# Distribute your app from your own website in the EU

> Have an Agent register your website's domain with Apple, add your app's key, send a version for Notarization and get the package your website installs from, for people in the EU.

Source: https://air.build/docs/app-store/distribute-from-your-website-in-the-eu/

Apple's Web Distribution lets you offer your iPhone and iPad app to people in the European Union from a website you own, instead of the App Store. Apple still checks each version, and your website installs it from a package Apple makes. Your Agents set up the App Store Connect side: your website's domain, your app's key, the version's review and the package.

> [!NOTE]
> Apple has to let your developer account use Web Distribution first. Apple's [Web Distribution in the EU](https://developer.apple.com/support/web-distribution-eu/) page says Apple authorizes developers who meet its criteria, and that the Account Holder of your Apple Developer Program membership asks for access after agreeing to the latest Apple Developer Program License Agreement. Your Agents can't ask for it.

AirBuild has no screen for this. You ask an Agent in the Project's chat, and it uses `asc alternative-distribution` (listed in [asc: apps and App Store listing](https://air.build/docs/cli/asc-apps/#alternative-distribution)). To look at it yourself, use App Store Connect on the web.

## Before you start

- Apple's access, from the note above. For the Account Holder's agreement, see [Accept Apple's updated agreement so your Agents can ship again](https://air.build/docs/app-store/accept-apples-new-agreement/).
- Any addendum Apple asks for. The `asc` help says that if Apple requires the Alternative Distribution Addendum for EU Apps, the Account Holder reviews and signs it in [Agreements in App Store Connect](https://appstoreconnect.apple.com/agreements/#/). Neither `asc` nor your Agents can sign it.
- Your app's App Store Connect record. See [Create your app's App Store Connect record](https://air.build/docs/app-store/create-your-app-record/).
- A domain you own, such as `example.com`, where people will install the app. Apple's page says the app can only be installed from a domain you've registered in App Store Connect. This page doesn't cover the install page on your website: see Apple's [Installing your app from your website](https://developer.apple.com/documentation/marketplacekit/installing-your-app-from-your-website).
- Your app's public key. `asc` doesn't make keys: it sends Apple the public key you give it. Keep the private key that goes with it on your own server, and don't send it in the chat. Apple's [Alternative Distribution Keys](https://developer.apple.com/documentation/appstoreconnectapi/alternative-distribution-keys) documentation is about these keys.

## Register your domain

Ask in the Project's chat, for example:

```text
Register example.com as an alternative distribution domain, with the reference name Example Website.
```

The Agent runs `asc alternative-distribution domains create` with the domain and a reference name, a name you choose for it. Both are needed. A domain isn't tied to one app: the command doesn't take one.

To check, ask "Which alternative distribution domains do we have?" The Agent lists them with `domains list`, each with its domain, reference name and the date it was added.

## Add your app's key

Attach the public key file to your message (see [Send photos, files and sketches to an Agent](https://air.build/docs/projects/send-photos-and-files/)), or paste the key into the message, and ask:

```text
Add the attached public key as this app's alternative distribution key.
```

The Agent runs `asc alternative-distribution keys create` for the app, with the key from the file (`--public-key-path`) or from the text (`--public-key`). To check, ask "Show this app's alternative distribution key." The Agent reads it with `keys app`.

## Send a version for Notarization

Apple checks every version you distribute. Apple's [Submit for Notarization](https://developer.apple.com/help/app-store-connect/managing-alternative-distribution/submit-for-notarization) help describes two review types:

- Notarization: the version is checked against Apple's Notarization Review Guidelines, and is eligible only for alternative distribution.
- App Store: the version is checked against the App Review Guidelines, as usual. Apple says an approved version is eligible for the App Store, alternative app marketplaces and your website in the EU.

If the version isn't going to the App Store, ask the Agent to set its review type first:

```text
Set version 1.2 to Notarization review, then submit it.
```

The Agent sets it with `asc versions update --review-type NOTARIZATION` (see [asc: apps and App Store listing](https://air.build/docs/cli/asc-apps/#versions)). Apple's help says the review type is chosen for each version, so a later version goes to the App Store only if it's set to `APP_STORE`. Then the Agent submits it with the same `asc` commands as any version (see [Submit to App Review and release](https://air.build/docs/app-store/submit-for-review/)). AirBuild's **App Review** tab doesn't show a version's review type, and it isn't known whether its submit works for a Notarization version, so ask the Agent to submit it.

## Get the package

Apple's help says Apple makes a version's package automatically when the version meets its conditions, among them that you've added a domain. See Apple's [Get an alternative distribution package ID](https://developer.apple.com/help/app-store-connect/managing-alternative-distribution/get-an-alternative-distribution-package-id) for the list.

Ask in the chat:

```text
Get the alternative distribution package for version 1.2 and list its package versions.
```

1. The Agent looks for the version's package with `asc alternative-distribution packages app-store-version`. If there's none, it can make one with `packages create`.
2. It lists the package's versions with `packages versions list`. Each one has a download address, the date that address expires, the version, a checksum and a state: `COMPLETED` or `REPLACED`.
3. If your website needs them, it lists a package version's variants (`packages versions variants`) and deltas (`packages versions deltas`). Each has its own download address and expiry date. The `asc` help doesn't say what variants and deltas are for: see Apple's [Installing your app from your website](https://developer.apple.com/documentation/marketplacekit/installing-your-app-from-your-website).

In App Store Connect, Apple's help says the package ID is next to each eligible version: open your app, choose History in the sidebar, and find Alternative Distribution Package ID.

To have Apple tell your server when a new package version is ready, ask for a webhook with the `ALTERNATIVE_DISTRIBUTION_PACKAGE_VERSION_CREATED` event: see [Get webhook events from Apple at your server](https://air.build/docs/app-store/get-webhook-events-from-apple/).

## Change or remove

| Ask | `asc` |
| --- | --- |
| "Which domains do we have?" | `alternative-distribution domains list` |
| "Remove the example.com domain." | `domains delete`, only with `--confirm`, so the Agent asks you first. |
| "Show this app's key." | `keys app` |
| "Remove this app's key." | `keys delete`, only with `--confirm`, so the Agent asks you first. |
| "Show the package for version 1.2." | `packages app-store-version` |

## Questions

**Can I do this in AirBuild?**

No. AirBuild's App Store Connect tabs have no screen for Web Distribution. Ask an Agent, or use App Store Connect on the web.

**Does this work for a Mac app?**

Apple's [Web Distribution in the EU](https://developer.apple.com/support/web-distribution-eu/) page is about iOS and iPadOS apps, and says people need iOS 17.5 or iPadOS 18 or later.

**The Agent says the Account Holder has to sign an addendum.**

The Alternative Distribution Addendum for EU Apps is signed by the Account Holder in [Agreements in App Store Connect](https://appstoreconnect.apple.com/agreements/#/). `asc` can't sign it. Once it's signed, ask again.

**The Agent says only one of --public-key or --public-key-path is allowed.**

The key was given twice. Give it one way: attach the file, or paste the key.

**The Agent says the public key file is empty.**

The file it read has nothing in it. Attach the public key file again, or paste the key into the message.

**There's no package for my version.**

Apple makes one only when its conditions are met. Check Apple's [Get an alternative distribution package ID](https://developer.apple.com/help/app-store-connect/managing-alternative-distribution/get-an-alternative-distribution-package-id). If the Agent's `packages create` fails, it shows Apple's reason after "alternative-distribution packages create: failed to create:".

**A download address stopped working.**

Each address has an expiry date. Ask the Agent to list the package versions again.
