Skip to main content
Exposing multiple environments in the same project to search engines can harm your production site’s SEO rankings, for example, through duplicate content, broken links, or unpolished pages. Whether search engines can index an environment depends on its domain:
  • No custom domain: Always hidden from search engines. This default behavior cannot be changed.
  • Preview environment with a custom domain: Hidden by default. You can make it visible.
  • Production environment with a custom domain (new project): When you add a custom domain, the site becomes visible to search engines by default. You can change this at any time.
  • Production environment with a custom domain (existing project): Retains its current setting when a custom domain is added. You can change this at any time.
If multiple environments have custom domains, ensure that at most one is visible to avoid duplicate content and SEO dilution.
To change whether search engines can index an environment:
Prerequisite: The environment must have a custom domain.
  1. Select the project you want to update.
  2. From the Environment menu, select the environment.
  3. Click Settings.
  4. Select or clear the Hide from search engines checkbox.
Upsun can’t guarantee that indexers follow the instructions. To restrict access entirely, set up HTTP access control.

How it works

When Hide from search engines is enabled, Upsun adds the following header to responses, which instructs search engines to not index and to not traverse your site:
X-Robots-Tag: noindex, nofollow
This setting can only be changed on environments with a custom domain.

Alternative method: Use a robots.txt file

You can also send instructions to search engine indexers using a robots.txt file. Your app can serve this as a static file from its disk or as a dynamic response from its passthru. Control either with the location section of your app configuration. If your robots.txt file instructs search engines to ignore a page, that instruction takes effect regardless of whether Upsun is configured to send the X-Robots-Tag header.

What’s next

Last modified on May 28, 2026