Railway
Railway environments: no noindex, one domain story
Railway sends no noindex header on staging or PR environment domains. What the platform actually documents, and how to keep those URLs out of Google.
Railway documents no noindex header for any environment; the header has to come from your application, gated on the RAILWAY_ENVIRONMENT_NAME variable. Every Railway environment that has a public domain is crawlable, and PR environments only get domains automatically when the base environment services use Railway-provided domains.
Why Railway does this
Railway's environments doc: "All projects in Railway are created with a production environment by default", persistent environments exist for patterns like "a staging environment that is configured to auto-deploy from a staging branch", and PR environments "are created when a Pull Request is opened on a branch and are deleted as soon as the PR is merged or closed". On domains: "Services in PR environments will only receive domains automatically when their corresponding base environment services have Railway-provided domains." Nothing in the public networking or environments documentation describes an X-Robots-Tag or noindex header added by the platform, so a staging domain is indexable HTML served exactly like production. The application can tell which environment it is in: the variables reference documents RAILWAY_ENVIRONMENT_NAME and RAILWAY_PUBLIC_DOMAIN, which is enough to emit the header in code and keep it off production.
Check it right now
Before changing anything, confirm what a crawler actually sees. The check is free, takes one URL and needs no account.
How to fix it
- Run the X-Robots-Tag checker on the indexed Railway URL to confirm the header is absent.
- In application code, read RAILWAY_ENVIRONMENT_NAME and send "X-Robots-Tag: noindex" when it is anything other than production.
- Redeploy the staging environment and run the checker again on its URL.
- Confirm production still returns no noindex by checking one production URL.
- For PR environments you do not want crawled at all, note that services without public domains cannot be crawled; keep domain provisioning limited rather than adding domains to PR services.
- If a staging domain is already listed in Google, request removal in Search Console after the header is live.
Why it happens again
Railway environments are cheap to duplicate, so teams make them: a persistent staging, a PR environment per pull request, a demo environment for a client. None of them gets a header from the platform, and every new service added to an environment is another origin that needs the application-level header. PR environments vanish on merge, which eventually cleans those URLs up for you; persistent staging domains never do.
stillindexed re-checks the URLs you give it every 30 minutes on Starter and alerts when a directive changes, at most 30 minutes after it does. It is a monitor rather than a crawler: it watches a list you choose and tells you when one of seven things changes. Start with a 30-day free trial, 3 sites, no card required, and a 30 day refund after that.
Catching it next time
Fixing it once is the easy half. The setting that caused this can be changed again by anyone with access, and the page will keep returning 200 while it happens.
A staging or preview site indexed by Google, on other platforms
How Search Console reports it
Sources
Every claim about Railway above is from their own documentation, read on 2026-10-25. Platforms change their settings; if one of these is out of date, their page wins and we would like to know.