- Getting started with Salesforce Experience Cloud
- Lightning Web Components and the JavaScript Bridge
- Deep linking (this page)
- Salesforce LWC component deployment and reference
How deep linking works
Apple (iOS) and Google (Android) each require you to prove ownership of your domain before they allow URLs to that domain to open a native app. Proof of ownership is established by hosting a JSON file at a specific well-known path on your domain:
The challenge with Salesforce Experience Cloud is that it is a managed platform. You cannot place arbitrary files in the web root of your domain the way you would with a traditional web server. Both files must instead be served through the Salesforce platform itself.
Before starting: For production apps, configure your custom domain in Salesforce Setup before setting up deep linking. Deep linking must be configured against the domain end users will see. The Salesforce-generated
.my.site.com domain may not work correctly with App Store or Google Play link verification.
Step 7a: Apple app site association (AASA) for iOS
Create the Apex controller for iOS
Create a public Apex class that returns the AASA JSON payload. ReplaceTEAMID with your Apple Developer Team ID and update the bundle identifier to match your app:
Create the Visualforce page for iOS
Create a Visualforce page that serves the JSON with the correct content type. The page must be publicly accessible without authentication:Configure the URL rewrite for iOS
Map the well-known path to the Visualforce page using one of two approaches: Option A: Custom URL redirects (simpler) In Salesforce Setup, navigate to Sites > [Your Site] > Custom URLs and create a redirect from/.well-known/apple-app-site-association to the Visualforce page URL.
Option B: Site URL rewriter class (more control)
Implement the Site.UrlRewriter interface in an Apex class and register it under Sites > [Your Site] > Site URL Rewriter. This approach gives you programmatic control over the mapping and is preferred for orgs that already use a URL rewriter for other purposes.
Verify the AASA file
Before submitting your app to the App Store, verify that the file is reachable and valid:- Visit
https://yourdomain.com/.well-known/apple-app-site-associationin a browser and confirm it returns JSON without requiring sign-in. - Use the Median Deep Linking Validator to check the payload format.
- Confirm the
appIDvalue matches your app’s bundle identifier and Team ID exactly. A mismatch here is the most common cause of deep linking failures.
Step 7b: Asset links for Android
Create the Apex controller for Android
Create a separate Apex class for the Android Asset Links payload. Replace the package name and certificate SHA-256 fingerprint with the values from your app:keytool -list -v -keystore your.keystore.
Create the Visualforce page for Android
Configure the URL rewrite for Android
Map/.well-known/assetlinks.json to the Visualforce page using the same approach as for the AASA file above.
Verify the asset links file
- Visit
https://yourdomain.com/.well-known/assetlinks.jsonin a browser and confirm it returns JSON without requiring sign-in. - Use the Median Deep Linking Validator to validate the payload.
Step 7c: Configure deep linking in Median App Studio
Once both verification files are in place:- In Median App Studio, navigate to Link Handling > Universal Links / Deep Links / Web Credentials.
- Add your custom domain.

App Studio: deep link configuration
Troubleshooting: deep links open the browser instead of the app
If tapping a link opens the mobile browser rather than the app, work through the following checks in order:- File accessibility. Visit both well-known URLs in a browser while signed out of Salesforce. If you are redirected to a sign-in page, the Visualforce page is not marked as publicly accessible. Check the Guest User profile permissions for the page under Sites > [Your Site] > Public Access Settings.
- JSON validity. A single character error in the JSON payload causes silent verification failure. Use the validators linked above to confirm both files parse correctly.
- Domain mismatch. Confirm the domain in your Median deep linking configuration matches the domain where the verification files are hosted. Deep linking is domain-specific; a redirect from
.my.site.comto a custom domain will not carry the verification through. - App Store and Google Play propagation. Apple and Google cache AASA and Asset Links verification at app install time. If you updated the files after the app was installed on a test device, uninstall and reinstall the app to force a fresh verification check.