← All guides

GUIDE 02 / URL HYGIENE

Redirects and canonicals, explained.

A page can have more than one address. These two mechanisms help explain which address should lead and what happens to the others.

A redirect changes the destination.

An HTTP redirect tells a client to request another URL. The original response provides a status code and, ordinarily, a Location header containing the next destination. A browser can follow that instruction automatically.

A chain is the sequence of redirects before the final response. For example:

http://example.com/old-page
  301 → https://example.com/old-page
  301 → https://example.com/new-page
  200 → final page

This example has two redirect hops. If you control the first destination, you may be able to point it straight to the final URL. Check the complete path before changing rules.

Permanent and temporary have different meanings.

ResponseTypical use
301 / 308A resource has moved permanently.
302 / 307A resource is temporarily available elsewhere.
200The request succeeded; often the final page in a chain.
404 / 410The requested resource is missing or has been removed.

Method handling also differs between redirect codes, which matters for requests such as form submissions. Our inspector examines ordinary page-fetch requests. For search-specific handling, see Google’s redirect documentation.

A canonical identifies a preferred version.

A canonical link is a declaration in a page’s source or response headers. It can identify a preferred URL among duplicate or substantially similar pages. It does not send the visitor to that URL.

<link rel="canonical" href="https://example.com/guides/repotting/">

Keep the declaration consistent with the actual page, internal links, redirects, and sitemap. A canonical is a signal to search engines; it does not guarantee their final selection. Our tool reads what a site declares and cannot report Google’s selected canonical. Google’s canonicalization guide explains the distinction and supported methods.

What to investigate.

  • A loop: a destination eventually sends the client back to an earlier URL.
  • An unexpected host: a redirect or canonical points at a domain you did not intend.
  • An unnecessary chain: several intermediate URLs sit between the old link and its replacement.
  • A broken destination: the final page returns an error or an access restriction.
  • A mismatch: the final page declares another canonical when you expected it to identify itself.

A mismatch is not automatically wrong. Duplicate pages can deliberately point elsewhere. Compare the page content and the intended URL strategy.

One request is one view. Responses can vary by location, user agent, cookies, or time. This inspector reports the server-side request it made. It does not execute JavaScript redirects or reproduce a signed-in browsing session.

Keep old links useful.

When a page moves, send its old address to a real, relevant replacement. Check the final response and preserve useful paths where possible. A blanket redirect to the homepage can leave visitors without the content they came to find.