Technical SEO
Which redirect should you use: 301, 302, 307 or 308?
Permanent and temporary redirects send different signals. Learn when to use 301, 302, 307 and 308, and how to avoid chains, loops and migration mistakes.
Permanent and temporary redirects
Use a 301 or 308 when a URL has moved for good, and a 302 or 307 when the move is temporary. Google treats a permanent redirect as a strong signal that the new URL should be the canonical one shown in results, and a temporary redirect as only a weak signal, so the original URL usually stays in results.
- 301 Moved Permanently
- Permanent. Browsers may change a POST request to GET when following it.
- 308 Permanent Redirect
- Permanent. The request method and body are preserved.
- 302 Found
- Temporary. Browsers may change a POST request to GET.
- 307 Temporary Redirect
- Temporary. The request method and body are preserved.
For search, 301 and 308 are treated the same, as are 302 and 307. The difference matters for forms and APIs, where a POST must stay a POST.
Avoid chains and loops
A chain is a redirect that leads to another redirect, such as an old URL that points to an HTTP page that then redirects to HTTPS. Each hop adds delay for visitors and work for crawlers. Googlebot follows up to 10 hops before reporting an error; other crawlers may give up sooner, and their limits are not always documented.
A loop is a chain that leads back to itself, so the page never loads. Loops usually come from conflicting rules, such as one rule adding a trailing slash and another removing it.
Fix both by pointing every old URL directly at its final destination, and by reviewing redirect rules together after each migration or CMS change.
Update internal links to the final URL
Redirects exist for links you cannot change, such as links from other sites, old bookmarks and printed material. Inside your own site you control every reference, so point each one straight at the final URL:
- Navigation, footer and in-content links.
- Canonical tags and hreflang annotations.
- XML sitemap entries.
- Image and structured data URLs.
This removes a hop for every visitor and keeps your signals pointing at one URL.
Redirects in a site migration
- Map every old URL to its closest equivalent on the new site, one to one wherever possible.
- Do not send everything to the homepage. Google may treat redirects to an unrelated page as soft 404s, which means the old page is treated as gone rather than moved.
- If a page has no equivalent, let it return 404 or 410.
- Update internal links, canonicals and sitemaps to the new URLs.
- For a domain change, use the Change of Address tool in Search Console once the redirects are live.
- Keep the redirects in place for as long as possible; Google recommends at least one year.
JavaScript and meta refresh redirects
Server-side redirects that return a 3xx status code are the most reliable, because every crawler sees them without rendering the page. If you cannot configure the server, a meta refresh is the next option: Google treats an instant one as permanent and a delayed one as temporary.
<meta http-equiv="refresh" content="0; url=https://www.example.com/new-page/">JavaScript redirects are the weakest choice. Google only sees them once it renders the page, and crawlers that do not run JavaScript may not follow them at all. Google suggests using them only when server-side and meta refresh redirects are not possible.
Put it to work
- Free auditCheck your homepage in about a minute and see a preliminary score with your top issues.
- MovesDrafted fixes with a projected score impact. You approve, the connector applies.
More in Technical SEO
- What are Core Web Vitals?Core Web Vitals measure loading, responsiveness and visual stability. Learn the LCP, INP and CLS thresholds, how they are measured and how to fix them.
- What is structured data and schema markup?Structured data describes a page's content in a format machines can read. Learn JSON-LD, the common schema types, rich results and how to test markup.
- What is a canonical tag?A canonical tag tells search engines which URL is the main version of duplicate pages. Learn how it works, how to set it and which mistakes to avoid.
- What is an XML sitemap and what goes in it?An XML sitemap lists the URLs you want search engines to find. Learn what to include, how lastmod is used, the size limits and how to submit one.
- Can crawlers see content rendered by JavaScript?Googlebot renders JavaScript, but many AI crawlers appear to read only the raw HTML. Learn how rendering works and how to keep key content visible to both.
- How to control crawling, indexing and snippetsRobots.txt controls crawling, noindex controls indexing and canonicals consolidate duplicates. Learn what each one does and when to use which.
- How to write title tags and meta descriptionsTitles and meta descriptions shape how a page appears in search results. Learn how to write them, why Google rewrites them and how long they should be.