Skip to content

301, 302, 307 and 308 Redirects: What the Codes Mean

Last checked 15 November 2026

Four codes cover almost every page move. Two say "this is for good" and two say "this is for now". For an ordinary link click, visitors see no difference between the codes. Search engines treat permanent and temporary codes differently, though, and the codes differ in how they handle forms and other requests that send data, so the choice matters.

The permanent pair: 301 and 308

A 301 means "moved permanently". A 308 means "permanent redirect". MDN says permanent redirects are meant to last forever and that they imply the original address shouldn't be used any more. Crawlers, the programs search engines use to read the web, will update the old address to the new one.1

For a renamed page or a reorganised site, that's usually what you want. Google says the same: use a permanent redirect when you're sure it won't be reverted.2

The temporary pair: 302 and 307

A 302 is "found" and a 307 is "temporary redirect". MDN gives a plain use for them: a page that's unavailable for unforeseen reasons. Crawlers don't memorise the new, temporary address.1

A good fit is a shop page down for a repair, where visitors go to a notice page for a few days and then the old page returns.

Why the second code in each pair exists

You'll sometimes see 301 and 302 on one side, 308 and 307 on the other. The older codes were meant to keep the way a form or request is sent, but MDN says some programs change it anyway. The newer codes, 307 and 308, were created to remove that doubt.1

For an ordinary page that people open by clicking a link, the difference rarely shows. It matters more for forms and other things that send data.

What search engines do with each

Kind Codes What Google says
Permanent 301, 308 Shows the new target in search results2
Temporary 302, 307 Shows the source page in search results2
Choosing between a lasting and a short-term movePage has a new addressWill the old one return?No: use a permanent codeYes: use a temporary code
Decide how long the old address will stay out of use.

So a temporary code on a page that moved for good can leave the old address showing in search. A permanent code on a short-term move can push the wrong address forward. The search engines page goes further into this.

The default trap

Some servers use a temporary code unless you say otherwise. Apache's Redirect line is one. With no status given, it returns a 302. Adding the word permanent makes it return a 301.3

That means a rule written without thinking can quietly be the wrong kind. If you moved a page for good and the rule has no permanent, the old address is being told "just for now". How to see which code your address really returns is on the checking page.

A quick way to decide

  • Page has a new home and the old address won't come back: permanent.
  • Page is away briefly and the old address will return: temporary.
  • Still unsure: Google's wording for a permanent redirect is "when you're sure that the redirect won't be reverted".2 If you aren't sure, think about which address you want shown in search results.

Other codes, such as 303 for a form that has just been sent, exist too. They don't come up when you're renaming pages.1

Cited material

  1. Redirections in HTTP, MDN Web Docs
  2. Redirects and Google Search, Google Search Central
  3. Apache Module mod_alias, Apache HTTP Server Project