A redirect tells browsers and search engines: "the page you asked for is somewhere else, go there instead." It happens in a split second and visitors rarely notice. Search engines notice, though, and the type of redirect you choose tells them whether to remember the old address or the new one.
The short answer
- Use a 301 (or 308) when a page has moved for good: a new domain, switching to HTTPS, choosing www or non-www, or renaming a page.
- Use a 302 (or 307) when the move is temporary: a page under maintenance, a short promotion, a test, or sending visitors to a different page based on their language or location for now.
How search engines treat each type
Google's documentation describes permanent redirects (301 and 308) as a strong signal that the new URL should be shown in search results, and temporary redirects (302, 303 and 307) as a weak signal, meaning Google may keep the old URL indexed. In practice:
| Code | Type | Search engines usually… |
|---|---|---|
| 301 Moved Permanently | Permanent | Replace the old URL with the new one in results |
| 308 Permanent Redirect | Permanent | Same as 301, and the request method is preserved |
| 302 Found | Temporary | Keep the old URL, though a long-lived 302 may eventually be treated as permanent |
| 307 Temporary Redirect | Temporary | Same as 302, and the request method is preserved |
| Meta refresh (0 seconds) | Page-level | Generally treat it like a permanent redirect, but server redirects are preferred |
| JavaScript redirect | Page-level | May follow it after rendering the page. Use only when a server redirect isn't possible |
See Google's own guide, Redirects and Google Search, for the details.
The most common redirect mistakes
Using 302 for a permanent move
Many control panels, plugins and frameworks default to 302. After a site move or HTTPS switch, check your main pages with the Redirect Checker. If you see 302 where the move is permanent, change the rule to 301.
Redirect chains
Chains build up over the years. Here's a typical one:
http://example.com/shop → https://example.com/shop → https://www.example.com/shop → https://www.example.com/store
That's three hops for one page. Each adds a round trip for visitors, which is especially noticeable on mobile, and crawlers follow only a limited number of hops (Googlebot follows up to 10). Fix chains by pointing every old URL straight at the final destination.
Redirect loops
A loop happens when rules point at each other, for example A → B → A. Visitors see an error such as "too many redirects". Common causes are a CDN or proxy forcing HTTPS while the server forces HTTP, conflicting www and non-www rules, or a plugin and a server rule doing opposite things. The Redirect Checker shows loops clearly.
Redirecting everything to the homepage
When you delete or reorganize pages, it's tempting to redirect all of them to the homepage. Visitors who wanted a specific article land somewhere unhelpful, and Google may treat those redirects as "soft 404s". Redirect each old URL to its closest equivalent, or let truly gone pages return 404 or 410.
Redirecting to an error page
Every chain should end on a page that returns 200 OK. Old rules sometimes point to pages that were later deleted, so the visitor is redirected straight into a 404.
Check the four versions of your domain
People reach your site at four addresses: http://example.com, http://www.example.com, https://example.com and https://www.example.com. Pick one as your preferred version and make the other three 301-redirect to it in a single hop. Tick Also check http/https and www/non-www in the Redirect Checker to test all four at once.
A quick redirect checklist
- Permanent move? Use 301 or 308.
- One hop from any old URL to its final page.
- Every chain ends on a 200 page.
- All four domain versions reach the same preferred address.
- Internal links, menus and your sitemap point at final URLs, not at redirects.
- Keep redirects in place for at least a year after a move, and longer if old links still get visits.
Frequently asked questions
Does a 301 redirect lose SEO value?
Google has said that redirects themselves don't cause a loss of PageRank. What matters is pointing to a closely matching page. Redirecting many unrelated pages to your homepage can mean those old signals aren't carried over.
How long should I keep a 301 redirect?
As long as possible, and at least a year. Google recommends keeping redirects in place for at least a year after a move, and old links on other sites may keep sending visitors for years.
Is a 302 bad for SEO?
Not if the move really is temporary. It becomes a problem when it's used for permanent moves, because search engines may keep showing the old URL. If a "temporary" redirect stays in place for a long time, Google may eventually treat it as permanent, but it's better to send the right signal from the start.
What is the difference between 301 and 308?
Both are permanent. A 308 also guarantees that the browser repeats the same request method and body (for example a POST from a form), while a 301 may be changed to a GET. For normal page moves, either works; 301 is the most widely used.