Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

origin

Rules: 16

origin/canonical-host

Entry variants do not all lead to one canonical origin

origin/canonical-host/mismatch · warning · score 5.6 · site

When http, https, www and the bare domain each serve the site, search engines split ranking across copies and visitors land on inconsistent addresses. Judged once per origin.

Fix

Redirect every http, https, www and apex variant to the one canonical origin with a 301 or 308.

Runs by default, in the recommended ruleset.

References

For rule authors

Reads

  • site.origins.*.variants.probes

origin/compression

The home page is not offered in br, zstd and gzip

origin/compression/missing · info · score 2.4 · site

Missing compression makes every visitor download more bytes, which is slowest on mobile connections. Only a text page of 1 KiB or more is judged.

Reported as

/ is served only with the value found; offer br, zstd and gzip, each to the clients that ask for it

Fix

Configure the server to compress text responses with br, zstd and gzip.

Runs by default, in the recommended ruleset.

References

For rule authors

Reads

  • site.origins.*.encodings.served

Expects

{
  "allOf": [
    {
      "contains": {
        "const": "br"
      }
    },
    {
      "contains": {
        "const": "zstd"
      }
    },
    {
      "contains": {
        "const": "gzip"
      }
    }
  ]
}

When

{
  "site.origins.*.encodings.bytes": {
    "minimum": 1024
  },
  "site.origins.*.encodings.content-type": {
    "pattern": "^(text/|application/xhtml\\+xml)"
  }
}

origin/cross-domain-policy

A cross-domain policy file lets any origin read the site

origin/cross-domain-policy/insecure · warning · score 5.2 · site

A wildcard policy lets a page on any other site make Flash or Silverlight requests as the visitor and read the answers. Judged once per origin.

Reported as

a cross-domain policy file lets any origin read the site as its visitor: the value found

Fix

Delete crossdomain.xml and clientaccesspolicy.xml, or list only the domains that need access.

Runs by default, in the recommended ruleset.

References

For rule authors

Reads

  • site.origins.*.cross-domain.open

Expects

{
  "maxItems": 0
}

origin/entry-redirect-path

Entry redirects drop the requested path or query

origin/entry-redirect-path/missing · warning · score 5.4 · site

A visitor who follows a deep link or a bookmark through http or www ends on the home page instead of the page they wanted. Judged once per origin.

Reported as

entry variants lose the requested path or query on the way: the value found

Fix

Carry the request path and query into the Location of every entry redirect.

Runs by default, in the recommended ruleset.

References

For rule authors

Reads

  • site.origins.*.variants.dropped

Expects

{
  "maxItems": 0
}

origin/entry-redirect

Entry variants take more than one redirect hop

origin/entry-redirect/excessive · warning · score 4.8 · site

Each extra redirect adds a round trip before the page starts loading, and search engines may stop following a long chain. Judged once per origin.

Reported as

entry variants take more than one hop, or two not starting http to https on the same host: the value found

Fix

Redirect each variant straight to the canonical origin, or first to https on its own host and then there.

Runs by default, in the recommended ruleset.

References

For rule authors

Reads

  • site.origins.*.variants.long

Expects

{
  "maxItems": 0
}

A redirect sends visitors from https back to plain http

origin/entry-redirect/insecure · error · score 9.0 · site

The visitor’s connection drops from encrypted to unencrypted, so anyone on the network can read or alter the page. Judged once per origin.

Reported as

entry variants are sent from https back to plain http: the value found

Fix

Never redirect an https request to an http URL.

Runs by default, in the recommended ruleset.

References

For rule authors

Reads

  • site.origins.*.variants.downgraded

Expects

{
  "maxItems": 0
}

Entry variants redirect with a temporary status

origin/entry-redirect/temporary · warning · score 4.6 · site

A 302, a 307 or a meta refresh tells search engines the move is not permanent, so they keep indexing the old address. Judged once per origin.

Reported as

entry variants redirect with a temporary status or a meta refresh: the value found

Fix

Answer every entry variant with 301 or 308, never 302, 307 or a meta refresh.

Runs by default, in the recommended ruleset.

References

For rule authors

Reads

  • site.origins.*.variants.temporary

Expects

{
  "maxItems": 0
}

origin/error-page

The not-found page exposes a stack trace or server version

origin/error-page/disclosing · warning · score 5.0 · site

A stack trace or a version number tells attackers exactly which software and flaws to target. Only judged when the missing-page request answers 404 or 410.

Reported as

the not-found page is not plain HTML free of stack traces and server versions (got the value found)

Fix

Serve a plain HTML 404 page with no server version or stack trace.

Runs by default, in the recommended ruleset.

References

For rule authors

Reads

  • site.origins.*.not-found

Expects

{
  "properties": {
    "content-type": {
      "const": "text/html"
    },
    "bytes": {
      "minimum": 1
    },
    "trace": {
      "const": false
    },
    "server": {
      "not": {
        "pattern": "\\d+\\.\\d+"
      }
    }
  }
}

When

{
  "site.origins.*.not-found.status": {
    "enum": [
      404,
      410
    ]
  }
}

origin/favicon

/favicon.ico is not an image

origin/favicon/invalid · info · score 2.2 · site

Browsers and crawlers request /favicon.ico by default, so an HTML error page there leaves a missing icon and wastes a request.

Reported as

/favicon.ico is not an image (got the value found)

Fix

Serve /favicon.ico as a real image (PNG, ICO, or SVG).

Runs by default, in the recommended ruleset.

References

For rule authors

Reads

  • site.origins.*.favicon

Expects

{
  "required": [
    "status",
    "content-type"
  ],
  "properties": {
    "status": {
      "minimum": 200,
      "maximum": 299
    },
    "content-type": {
      "pattern": "^image/"
    }
  }
}

origin/https-redirect

Plain http does not redirect to https in one permanent hop

origin/https-redirect/missing · off · score 5.0 · site

Visitors who type or follow an http address stay unencrypted or take a detour. Superseded by the canonical-origin check and off by default.

Reported as

plain http does not redirect to https in one permanent hop (got the value found); deprecated, see origin/canonical-host/mismatch

Fix

Redirect every http request to https with a 301 or 308, preserving the URL.

Off in every shipped ruleset; an override turns it on.

References

For rule authors

Reads

  • site.origins.*.entry

Expects

{
  "required": [
    "status",
    "https"
  ],
  "properties": {
    "status": {
      "enum": [
        301,
        308
      ]
    },
    "https": {
      "const": true
    }
  }
}

origin/locale-redirect

The home page redirects by Accept-Language

origin/locale-redirect/present · warning · score 4.4 · site

Visitors and crawlers asking in different languages are sent to different URLs, so search engines may only ever see one of them. Judged once per origin.

Reported as

/ lands on the value found different URLs depending on Accept-Language

Fix

Serve the same content for every language unless the page has language-specific alternates.

Runs by default, in the recommended ruleset.

References

For rule authors

Reads

  • site.origins.*.locale.distinct

Expects

{
  "const": 1
}

origin/revalidation

A conditional request is not answered with 304 Not Modified

origin/revalidation/broken · info · score 1.8 · site

Without 304 replies every repeat visit and every crawler re-downloads the whole page. Only judged when the page carries a validator such as an ETag.

Reported as

a conditional request for the seed page answers the value found, not 304 Not Modified

Fix

Answer a request whose If-None-Match or If-Modified-Since still matches with 304 and no body.

Runs by default, in the recommended ruleset.

References

For rule authors

Reads

  • site.origins.*.revalidation.repeat

Expects

{
  "const": 304
}

When

{
  "site.origins.*.revalidation.validator": {
    "type": "string"
  }
}

origin/slash-redirect

A page answers under both trailing-slash forms with the same title

origin/slash-redirect/missing · warning · score 5.2 · site

Two addresses for one page split links and search ranking between them and create duplicate content. Judged once per origin.

Reported as

a page answers 2xx with the same title under both trailing-slash forms: the value found

Fix

Redirect the trailing-slash form you do not use to the one you do with a 301 or 308.

Runs by default, in the recommended ruleset.

References

For rule authors

Reads

  • site.origins.*.slash-twins.duplicated

Expects

{
  "maxItems": 0
}

origin/soft-404

Missing pages answer 200 instead of 404 or 410

origin/soft-404/present · warning · score 5.8 · site

Search engines index error pages as real content, and visitors and crawlers cannot tell a dead link from a live page. A random missing URL is requested once per origin.

Reported as

a missing page answers the value found, not 404 or 410

Fix

Return 404 or 410 for missing pages instead of 200 with a soft-404 body.

Runs by default, in the recommended ruleset.

References

For rule authors

Reads

  • site.origins.*.not-found.status

Expects

{
  "enum": [
    404,
    410
  ]
}

origin/www

A host that resolves in DNS does not answer

origin/www/broken · warning · score 5.6 · site

Visitors and search engines who reach the www or apex host get an error or a timeout, and redirect advice is pointless until the server answers. Judged once per origin.

Fix

Repair the server behind the host so it answers and redirects to the canonical origin, or remove the host’s DNS records.

Runs by default, in the recommended ruleset.

References

For rule authors

Reads

  • site.origins.*.variants.probes

The www or apex host has no DNS answer

origin/www/unreachable · info · score 1.0 · site

Visitors who type the address with or without www get an error instead of the site. A hint only, since a missing variant can be deliberate.

Reported as

no DNS answer for the entry host the value found; make sure that is deliberate

Fix

Publish an A or AAAA record for the www or apex host and redirect it to the canonical origin.

Runs by default, in the recommended ruleset.

References

For rule authors

Reads

  • site.origins.*.variants.unresolved

Expects

{
  "maxItems": 0
}