Skip to content

Add "test mode" to project to avoid Google Search traffic begin redirected to test environments and improving page rank #404

Description

@guidol-ive

A test instance of Hypha is indexed and followed by Google Search and other crawlers when discovered. This is not hypothetical, but already affecting sites and withholding search traffic from production sites. For example, the following picture displays a search on site:test.destadsbr0n.nl (with intended typo) having Google Search display test data:

Image

Suggestion is to add a boolean attribute "testMode" or a boolean "allowIndex" to control availability for indexing.

When set to try, the following HTTP header is set on each page:

X-Robots-Tag noindex,nofollow

Plus for instance a meta tag generated into the head:

<meta name="robots" content="noindex,nofollow">

Additional bonus is - given absence of canonical URLs - the remaining pages rank higher.

Workaround Caddy

As a workaround, on Caddy the following definition implements the same:

domainname
{
  import hsts

  header * X-Robots-Tag "noindex,nofollow"

  header {
    -Server
    -Via
  }

  reverse_proxy http://1.2.3.4:5 {
  }
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions