Guides
When an app’s address changes
Your app has a new address and the old one is being retired. Exactly what to update — OAuth redirect URIs, webhooks, CORS, links — written for you and for your AI agent.
What has changed
An app’s default address — the one Shipyard gives it on the platform’s apps domain — has been replaced by a new one. Nothing about the app itself changed: same code, same data, same environment variables, same database.
- The NEW address is live now and is the one to use from here on.
- The OLD address remains in service until its retirement date, so nothing breaks on the day of the change. After that date it is retired.
- Custom domains you connected yourself (for example app.yourcompany.com) are not affected in any way. If your users only ever use your custom domain, most of this page does not apply to you — but still check the OAuth and webhook sections for anything registered with the platform address.
- Database hostnames and connection strings are not affected. Do not change DATABASE_URL or any other database setting because of this.
Find your old and new addresses
In the console: open the app → Domains. The entry marked “Old address · retires <date>” is the old one; the entry of type default without that mark is the new one. Each environment (production, staging, …) has its own pair.
From the API (this is what an AI agent should use — never guess an address from the app’s name):
curl -s -H "Authorization: Bearer $SHIPYARD_TOKEN" "$SHIPYARD_API/tenants/<tenantId>/domains"
# Each entry has: fqdn, type ("default" | "custom"), environmentId, appId, retiresAt.
# type = "default" and retiresAt = null → the NEW address of that environment
# type = "default" and retiresAt = "<date>" → the OLD address, retired on that date
# type = "custom" → your own domain; unchanged
# Pair old and new by environmentId. Add ?appId=<appId> to look at one app.- An app’s list entry (GET /tenants/<tenantId>/apps) also carries oldAddress { id, host, retiresAt, state, successful, noticeViews, lastUsedAt, movedAt } while an old address is still in service, and primaryUrl for the address to use. state is action_needed (really in use: 5 or more successful requests answered through the old address in 7 days; visits to the “address has moved” page are shown but do not count), quiet, done (marked as moved) or done_in_use (marked as moved, but still being called).
What keeps working on the old address, and what does not
- API calls, fetch/XHR requests, webhooks, POSTs and asset requests sent to the old address reach the app exactly as before, until the retirement date.
- A person who opens the old address in a browser sees a short “this app has a new address” notice and is taken to the same page on the new address after 5 seconds. They can choose to stay on the old address for a day.
- Sessions do not carry over. Cookies belong to a hostname, so every user signs in once more on the new address. This is expected and happens once.
- Anything stored per-origin in the browser (localStorage, IndexedDB, saved passwords, “remember this device”) starts empty on the new address.
1. OAuth sign-in (Google, GitHub, Microsoft, …) — action required
If your app signs users in through an OAuth or OpenID Connect provider, that provider holds a list of allowed redirect URIs (also called callback URLs) and allowed origins. The new address must be added to that list. Until it is, sign-in started on the new address fails with an error such as “redirect_uri_mismatch” (Google) or “The redirect_uri is not associated with this application” (GitHub).
- 1Find the redirect path your app uses. It is in your code or auth library config — common ones are /api/auth/callback/google (NextAuth / Auth.js), /auth/google/callback (Passport), /oauth2/callback, /accounts/google/login/callback/ (django-allauth). Keep the path exactly as it is; only the host changes.
- 2In the provider’s console ADD the new redirect URI: https://<new address><same path>. Do not remove the old one yet.
- 3If the provider also has “Authorized JavaScript origins” / “Allowed origins” / “Homepage URL”, add https://<new address> there too.
- 4If your app builds the redirect URI from an environment variable (see section 3), change that variable to the new address and redeploy.
- 5Test: open the NEW address in a private window and sign in from scratch.
- 6After the retirement date — or as soon as you are sure nothing uses it — remove the old redirect URI and origin from the provider.
- Google: Google Cloud Console → APIs & Services → Credentials → your OAuth 2.0 Client ID → “Authorized redirect URIs” and “Authorized JavaScript origins”. Changes can take a few minutes to apply.
- GitHub: Settings → Developer settings → OAuth Apps (or GitHub Apps) → your app → “Authorization callback URL”. An OAuth App allows one callback URL, so switch it to the new address at the moment you switch your app’s own configuration.
- Microsoft Entra ID: App registrations → your app → Authentication → Redirect URIs.
- Auth0, Clerk, Supabase Auth, Firebase Auth, Okta and similar: add the new address to Allowed Callback URLs, Allowed Logout URLs, Allowed Web Origins / Authorized domains.
2. Webhooks and callbacks from other services
- Any service that calls your app at a URL you gave it keeps calling the old address until you change it there: payment providers (Stripe, Razorpay), Slack and other chat apps, GitHub/GitLab/Bitbucket repository webhooks you set up yourself, cron and uptime monitors, email/SMS providers’ delivery callbacks, and other internal systems.
- Update each one to https://<new address><same path>. They work on the old address until retirement, then fail silently — a webhook sender does not follow a notice page and usually does not tell you.
- Deploy webhooks that Shipyard itself registered on your repository are managed by the platform and need no change.
3. Your app’s own configuration
Search your environment variables and your code for the old hostname. Typical variables that hold it:
NEXTAUTH_URL AUTH_URL APP_URL BASE_URL PUBLIC_URL SITE_URL FRONTEND_URL BACKEND_URL
API_URL API_BASE_URL NEXT_PUBLIC_API_URL VITE_API_URL REACT_APP_API_URL
CORS_ORIGIN CORS_ALLOWED_ORIGINS ALLOWED_HOSTS CSRF_TRUSTED_ORIGINS COOKIE_DOMAIN SESSION_COOKIE_DOMAIN
OAUTH_REDIRECT_URI GOOGLE_REDIRECT_URI GITHUB_CALLBACK_URL WEBHOOK_URLcurl -s -H "Authorization: Bearer $SHIPYARD_TOKEN" "$SHIPYARD_API/tenants/<tenantId>/secrets?scopeType=environment&scopeId=<environmentId>"
curl -s -H "Authorization: Bearer $SHIPYARD_TOKEN" "$SHIPYARD_API/tenants/<tenantId>/secrets?scopeType=app&scopeId=<appId>"
# In the repository:
grep -rn "<old address>" . --include="*.{js,ts,tsx,py,json,yml,yaml,env,toml,md}"- Frontend + backend pairs: if a frontend app calls a backend app on its platform address, the frontend’s API URL variable must point at the backend’s NEW address, and the backend’s CORS allow-list must include the frontend’s NEW address. Change both, then redeploy both.
- Build-time variables (NEXT_PUBLIC_*, VITE_*, REACT_APP_*) are baked into the build. Changing them needs a new deploy, not just a restart.
- CORS: while both addresses are in service, allow BOTH origins. Remove the old one after retirement.
- Django: add the new host to ALLOWED_HOSTS and https://<new address> to CSRF_TRUSTED_ORIGINS. Rails: config.hosts. Any framework with a host allow-list needs the new host.
- Cookies: if you set a cookie Domain explicitly to the old hostname, change it. A cookie with no Domain attribute needs no change.
4. Links and everything outside the app
- Bookmarks, documentation, README files, onboarding emails, links in other apps, QR codes, and links in chat channel topics.
- Mobile or desktop clients that have the API address compiled in — these need a release. Plan it before the retirement date.
- Uptime monitors and status pages: point them at the new address, or they will report an outage on the retirement date.
- Content-Security-Policy, iframe allow-lists (frame-ancestors) and SSO “allowed applications” lists in other systems that name the old host.
- Third-party API keys restricted by HTTP referrer or origin (Google Maps, reCAPTCHA, Firebase): add the new origin to the key’s allowed list.
Checklist
- 1List old and new addresses for every environment (Domains tab or GET /tenants/<tenantId>/domains).
- 2OAuth providers: add the new redirect URI and origin for every provider the app uses.
- 3Environment variables and code: replace the old hostname; allow both origins in CORS; redeploy.
- 4Webhooks and callbacks in other services: point them at the new address.
- 5Links, monitors, client apps, referrer-restricted API keys.
- 6Test on the NEW address in a private window: open the app, sign in from scratch, perform one action that calls the backend, trigger one webhook.
- 7The console keeps a banner on the app, and the Domains tab keeps listing the old address, until it is retired — a reminder that the move is not finished.
- 8After the retirement date: remove the old redirect URIs, origins and CORS entries.
For AI agents: how to do this safely
- Get the address pairs from the API (section “Find your old and new addresses”). Never derive an address from an app’s name or slug, and never assume the pattern of one app applies to another.
- Change only what references the OLD DEFAULT address of an app in this workspace. Leave custom domains, database hostnames and connection strings alone.
- You can edit environment variables and repository code. You cannot edit OAuth provider consoles or third-party webhook settings — list those for the human with the exact old value, the exact new value, and where it is changed, and say clearly that they are still to be done.
- Add before you remove: add the new redirect URI, origin and CORS entry while keeping the old ones, and remove the old ones only after the retirement date.
- After changing variables, redeploy each affected environment and verify on the new address. Report anything you could not verify rather than assuming it works.
- If the app has a staging and a production environment, do staging first.
If something goes wrong
- Sign-in fails with redirect_uri_mismatch on the new address: the provider does not have the new redirect URI yet (section 1), or the app is still sending the old one (section 3, then redeploy).
- The frontend loads but every API call fails with a CORS error: the backend’s allow-list does not include the frontend’s new origin.
- Users are signed out: expected once — sessions are per hostname.
- You need more time: the old address is not retired while it still has visitors in the week before its date; it is kept another week and the platform’s administrators are told. Contact them if you need a longer window.
When you have finished: “I’ve moved”
Warnings about an old address are only shown while something really uses it. Once you have updated everything, say so: open the app’s Domains tab and choose “I’ve moved” on the old address, or use “We’ve moved everything” on the Apps page to mark every old address in the workspace.
- Warnings and reminders about that address stop, and people opening an old link are no longer shown the “address has moved” page.
- The old address keeps working until its retirement date. Marking it is a statement, not a deletion, and “Reopen” takes it back.
- If something keeps calling the address afterwards, you are told once in the console, and the address shows as “marked as moved, still in use”.
curl -s -X POST -H "Authorization: Bearer $SHIPYARD_TOKEN" "$SHIPYARD_API/tenants/<tenantId>/domains/<oldAddress.id>/moved"
curl -s -X DELETE -H "Authorization: Bearer $SHIPYARD_TOKEN" "$SHIPYARD_API/tenants/<tenantId>/domains/<oldAddress.id>/moved"
curl -s -X POST -H "Authorization: Bearer $SHIPYARD_TOKEN" "$SHIPYARD_API/tenants/<tenantId>/domains/moved-all"
