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

redirects

Rules: 3

redirects/chain

Reaching the page takes more than 2 redirects

redirects/chain/excessive · warning · score 4.8 · page

Every extra redirect adds a round trip before the page starts loading, which slows visitors, and crawlers may give up on long chains.

Reported as

takes more than 2 redirects to land

Fix

Collapse the redirect chain so the final URL is reached in one or two hops.

Runs by default, in the recommended ruleset.

References

For rule authors

Reads

  • http.redirects

Expects

{
  "type": "array",
  "maxItems": 2
}

redirects/redirect-by

A redirect does not say which component sent it

redirects/redirect-by/missing · hint · score 0.1 · page

Without Redirect-By, tracking down which server, plugin or rule issued an unexpected redirect means guessing. This is an optional aid for people debugging the site.

Reported as

a redirect does not say which component sent it with Redirect-By

Fix

Send Redirect-By: <component> with every redirect.

Off by default; a group that runs suggestions turns it on.

References

For rule authors

Reads

  • http.redirects

Expects

{
  "type": "array",
  "items": {
    "required": [
      "by"
    ]
  }
}

When

{
  "http.status": {
    "minimum": 200,
    "maximum": 299
  },
  "http.content-type": {
    "pattern": "^text/html"
  }
}

redirects/status

The page is reached through a temporary redirect

redirects/status/temporary · info · score 2.4 · page

A 302, 303 or 307 tells search engines the move may be undone, so they keep indexing the old URL and may not pass its ranking to the new one. Only pages that answer 2xx after redirecting are checked.

Reported as

reached through a temporary redirect

Fix

Answer a moved page with 301 or 308, not 302, 303 or 307.

Runs by default, in the recommended ruleset.

References

For rule authors

Reads

  • http.redirects

Expects

{
  "type": "array",
  "items": {
    "properties": {
      "status": {
        "enum": [
          301,
          308
        ]
      }
    }
  }
}

When

{
  "http.status": {
    "minimum": 200,
    "maximum": 299
  }
}