- 301 and 308 signal a permanent move. Google then treats the target as the canonical URL.
- 302, 303 and 307 are temporary. The old URL can stay in the search results.
- Every redirect points straight to the final target. By default Googlebot follows ten hops, and every chain costs time.
What types of redirect are there?
A redirect sends browsers and crawlers from one URL to another. The most reliable option is a server-side redirect. The server responds with a status code in the 3xx range and names the target in the Location header. There are also redirects in the HTML via meta refresh and redirects via JavaScript.
| Type | Meaning according to RFC 9110 | How Google treats it |
|---|---|---|
| 301 Moved Permanently | Moved permanently. For historical reasons, browsers may turn a POST into a GET. | Permanent, strong signal for the target |
| 308 Permanent Redirect | Moved permanently, the method stays the same | Like 301 |
| 302 Found | Temporarily located elsewhere, the old URL stays valid | Temporary, weak signal for the target |
| 303 See Other | Points to a different resource after a form submission | Like 302 |
| 307 Temporary Redirect | Temporary, the method stays the same | Like 302 |
| Meta refresh with 0 seconds | No HTTP status, instruction in the HTML | Permanent |
| Meta refresh with a delay | No HTTP status, instruction in the HTML | Temporary |
| JavaScript (location) | No HTTP status, only visible after rendering | Permanent, if Google renders the page |
Google recommends permanent server-side redirects wherever possible. According to Google, you should only use JavaScript redirects if server-side redirects and meta refresh are not an option. If rendering fails, Google never sees the redirect.
When is 301 right, and when 302?
The underlying question is which URL should appear in search. With a permanent redirect, the target takes on that role. With a temporary one, the old URL usually stays canonical, although Google still follows the redirect.
| Case | Redirect |
|---|---|
| Migration, new URL structure, domain change | 301 or 308 |
| Switch from http to https, from www to non-www | 301 or 308 |
| Product is gone for good and there is a suitable successor | 301 to the successor |
| Product is briefly sold out and will be back | No redirect, the page stays with a notice |
| Maintenance or a short promotion, after which the old URL applies again | 302 or 307 |
| Form submitted, followed by a thank-you page | 303 |
If the move is permanent, send a permanent code as well. Other search engines and clients read the codes too, so the right code is worth it even where Google treats two codes the same.
Setting up redirects
Where you maintain redirects depends on your setup. With many rules, it helps to keep them in one place, for example in the server configuration or in the CDN. That way you spot overlaps between old and new rules earlier.
Apache
nginx
Checking in the terminal
With curl you see every hop and the final status. If there is more than one redirect, you have a chain.
Chains and loops
A chain occurs when A redirects to B and B redirects to C. A typical cause is a combination of several rules, for example http to https, then non-www to www, then old URL to new URL. In a loop, C points back to A, and browsers stop with “too many redirects”.
- By default, Googlebot follows ten hops.
- Google ignores the content of a redirecting URL and only processes the target.
- For site moves, Google recommends redirecting straight to the final target. If that is not possible, keep it to three hops at most, and in any case fewer than five.
- The URL Inspection tool in Search Console does not follow redirects.
You find chains with a crawl that logs every hop individually. Three lists matter: internal links to redirects, redirects with more than one hop, and redirects whose target returns an error. Point internal links straight to the final target. Adjust old rules so that they redirect directly to the new target.
Redirects during a migration
During a migration, the redirect mapping decides whether rankings move with you. Every old URL with clicks, rankings or backlinks gets the target that matches its content.
- Collect old URLs from Search Console, web analytics, Rank Tracking, backlinks and a crawl of the old website.
- Assign each URL a target that matches its content and search intent. The homepage is only the last resort.
- Export existing redirects and switch their targets to the new URLs. That way, no new chains appear.
- Cover every variant of the old URL: with and without www, http and https, with and without a trailing slash.
- Test on the staging environment before go-live. Check beforehand whether the error page there returns a real 404 status, otherwise missing pages look like hits.
- After go-live, crawl all old URLs again and compare status and target with the mapping.
- Keep redirects for at least a year, as Google recommends for site moves. After that, log files and backlinks show which rules can go.
When changing domains, a global rule that only swaps the domain name is risky. It carries old errors and unnecessary URLs over to the new domain. One-to-one rules for the important URLs and patterns for the rest work better. The guide Testing redirects shows step by step how to test redirects before and after a migration.
Common mistakes
- All old URLs redirect to the homepage. Google may treat this as a soft 404.
- A 302 stays in place after the migration, although the move is permanent.
- Internal links, canonicals and the XML sitemap still point to old URLs.
- New rules and old redirects create chains.
- The target of a redirect returns a 404 or redirects itself.
- Redirects are deleted after a few weeks because the new website is “up and running”.
Frequently asked questions
What does status 301 mean?
“Moved Permanently”. The page can be found permanently at a new URL, and the server names the new address in the Location header.
Does a 301 redirect pass on link equity?
Google treats a 301 as a strong signal to process the target and treat it as canonical. The old URL can still appear in the results for a while as an alternative name.
Is a 302 instead of a 301 a problem?
Rarely in the short term. Google follows both. With a 302, however, the old URL can stay in the results. For permanent moves, 301 or 308 is correct.
How long should I keep 301 redirects?
As long as possible, according to Google generally at least one year. Google also says that users benefit from redirects that stay in place permanently.
How do I set up a 301 redirect in .htaccess?
With the line “Redirect 301 /alter-pfad/ https://www.example.com/neuer-pfad/”. For patterns, use RedirectMatch or RewriteRule.
What is the difference between 301 and 308?
Both are permanent and equivalent for Google. With 308, the browser must not change the method. A POST therefore stays a POST.
Sources
Retrieved on October 15, 2026. If something is out of date or missing, let us know.
- RFC 9110, HTTP Semantics, section 15.4 Redirection 3xx: https://www.rfc-editor.org/rfc/rfc9110.html#name-redirection-3xx · June 2022
- Google, Redirects and Google Search: https://developers.google.com/search/docs/crawling-indexing/301-redirects · As of Apr 14, 2026
- Google, HTTP status codes, network and DNS errors: https://developers.google.com/crawling/docs/troubleshooting/http-status-codes · As of Feb 4, 2026
- Google, Site moves with URL changes: https://developers.google.com/search/docs/crawling-indexing/site-move-with-url-changes · As of Aug 20, 2026
- Apache HTTP Server, mod_alias: https://httpd.apache.org/docs/2.4/mod/mod_alias.html
- nginx, ngx_http_rewrite_module (return): https://nginx.org/en/docs/http/ngx_http_rewrite_module.html#return