Skip to content

A temporary redirect for a move made for good

redirect-temporaryminor
On this page

Why it matters

  • 301 and 308 say the address changed for good: RFC 9110 says that future references to the page ought to use the new address. 302 and 307 say the move is temporary, and that clients ought to keep using the original address; 303 sends the client elsewhere for this answer alone.
  • Google takes a permanent redirect (301, 308) as a strong signal that the new address should be canonical, and a temporary one (302, 303, 307) as a weak signal. A move made for good is best said with the strong one.
  • A move to HTTPS, or between example.com and www.example.com, is not meant to be undone: this rule looks at those moves alone.
  • A move of a page to another path may be for good (a renamed category, a product's new address) or for a while (a sale, a page under repair): only the site knows. Servers write 302 when no status is named, so a move for good often goes out as a temporary one. The rule asks you to look at such a move, and never counts it as a failure.
  • A temporary redirect has its uses, such as sending visitors to their language's pages, to sign in, or to another page while one is down. The rule leaves those alone.

How to fix

Make the redirect permanent where the site sets it:

nginx
return 301 https://www.example.com$request_uri;
  • nginx: return 301, or the permanent flag of rewrite. Its redirect flag gives 302.
  • Apache (mod_rewrite): write [R=301,L]. The R flag alone gives 302. With mod_alias, Redirect permanent gives 301.
  • Use 308 rather than 301 where a form may be sent to the old address with POST: 308 keeps the method and the body.

How we detect

  1. We fetch the address you give as ArablyzerBot and follow its redirects. The rule applies when there was one at least.
  2. Each 302, 303 or 307 fails whose move only changes the scheme from http: to https:, only changes the name between example.com and www.example.com, or both, keeping the port, the path and the query.
  3. A 302 or 307 from one page to another path of the same site asks for your review, and is never a failure: from a page that is not the site's root, to one that is not either, with no query on either side, neither into nor out of a language's or a country's path (/ar/, /en-us/), and not to a sign-in, account, cart, checkout, consent or maintenance page.
  4. Other temporary moves pass: they are often meant.