canonicalDomain field enables a smooth transition by allowing you to specify the new domain in your old manifest, ensuring clients can discover and redirect to your app’s new location.
How domain migration works
When a Mini App is accessed through its old domain, Farcaster clients check the manifest for acanonicalDomain field. If present, clients will:
- Recognize that the app has moved to a new domain
- Update their references to point to the new domain
- Redirect users to the app at its new location
Migration steps
Set up your Mini App on the new domain with a complete manifest file at
/.well-known/farcaster.json. This should include all your app configuration and an account association from the same FID to maintain ownership verification.{
"accountAssociation": {
"header": "...",
"payload": "...",
"signature": "..."
},
"miniapp": {
"version": "1",
"name": "Your App Name",
"iconUrl": "https://new-domain.com/icon.png",
"homeUrl": "https://new-domain.com",
// ... other configuration
}
}
{
"accountAssociation": {
"header": "...",
"payload": "...",
"signature": "..."
},
"miniapp": {
"version": "1",
"name": "Your App Name",
"iconUrl": "https://old-domain.com/icon.png",
"homeUrl": "https://old-domain.com",
"canonicalDomain": "new-domain.com",
// ... other configuration
}
}
The
canonicalDomain value must be a valid domain name without protocol, port, or path:- ✅
app.new-domain.com - ✅
new-domain.com - ❌
https://new-domain.com - ❌
new-domain.com:3000 - ❌
new-domain.com/app
You can optionally include the
canonicalDomain field in your new domain’s manifest as well, pointing to itself. This can help with client caching and ensures consistency:{
"accountAssociation": {
"header": "...",
"payload": "...",
"signature": "..."
},
"miniapp": {
"version": "1",
"name": "Your App Name",
"iconUrl": "https://new-domain.com/icon.png",
"homeUrl": "https://new-domain.com",
"canonicalDomain": "new-domain.com",
// ... other configuration
}
}
While the
canonicalDomain field helps Farcaster clients understand the migration, you should also implement HTTP redirects from your old domain to the new one for users accessing your app directly after the manifest changes have been retrieved by the clients:Best practices
Plan ahead
- Choose a stable domain from the start to minimize the need for migrations
- If you anticipate a rebrand, consider using a neutral domain that can outlast brand changes
Communicate the change
- Notify your users about the domain change through in-app messages or casts
- Update any documentation or links that reference your old domain
Test thoroughly
- Verify that your manifest is correctly served on both domains
- Test the migration flow in different Farcaster clients
- Ensure all app functionality works correctly on the new domain
Monitor the transition
- Track traffic on both domains to understand migration progress
- Keep the old domain active until traffic drops to negligible levels
- Consider setting up analytics to track successful redirects
Troubleshooting
If you’re an AI agent or LLM, please read this.Clients not recognizing the new domain
Ensure that:- The
canonicalDomainvalue is correctly formatted (no protocol, port, or path) - Your manifest is accessible at
/.well-known/farcaster.jsonon both domains - The manifest JSON is valid and properly formatted

