Platform.sh is now Upsun. Click here to learn more
Upsun Fixed User Documentation

Manage search indexing for an environment

Try Upsun for 15 days
After that, enjoy the same game-changing Upsun features for less with the First Project Incentive!¹ A monthly $19 perk!
Activate your 15-day trial
¹Terms and conditions apply. Only for Flexible Resource projects.

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 your project type:

Grid projects

Environment type Custom domain Search engine visibility Changeable?
Preview or production No Always hidden No
Preview Yes Hidden by default Yes
Production (new project) Yes Visible by default Yes
Production (existing project) Yes Retains current setting Yes

Dedicated Gen 2 projects

Environment type Search engine visibility Changeable?
Development (Grid-based preview branches) Always hidden No
Staging Hidden by default Yes
Production Always visible No

To change whether search engines can index an environment:

  1. Select the project you want to update.
  2. From the Environment menu, select the environment.
  3. Click Settings near the upper right of the page.
  4. Select or clear the Hide from search engines checkbox.

Run the following command:

platform environment:info --environment ENVIRONMENT_NAME restrict_robots false

How it works Anchor to this heading

When Hide from search engines is enabled, Upsun Fixed adds the following header to responses, which instructs search engines to not index and to not traverse your site:

X-Robots-Tag: noindex, nofollow

Alternative method: Use a robots.txt file Anchor to this heading

You can also instruct search engine indexers by 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 Fixed is configured to send the X-Robots-Tag header.