Blog · September 30, 2026

301 vs 302 redirect: which one to use?

The difference between a 301 (permanent) and a 302 (temporary) redirect, when to use each, what changes for SEO, and the most common mistakes.

01

Quick summary

Both send the visitor from one address to another. The difference is the message you give the browser and Google: a 301 says "this address has moved for good", and a 302 says "go there for now".

301 (permanent)302 (temporary)
MeaningThe address moved for goodA temporary detour
GoogleShows the destination and passes its ranking signals to itKeeps showing the original address
BrowserCaches the redirectAsks again on every visit
Use forRoot domain to www, domain change, platform migrationCampaigns, maintenance, destinations that will change
A 301 sends mystore.com to www.mystore.com for good; a 302 sends mystore.com/black-friday to a collection for now
A 301 is a move; a 302 is a detour.

When in doubt: if you don't plan to go back, use a 301.

02

When to use a 301

Use a 301 whenever the old address won't be used again. Google treats the destination as the replacement for the old page and passes it the ranking the old page had (links, history, position in search results).

Root domain to www

mystore.com → https://www.mystore.com. The most common case: platforms like VTEX only run on www, so the root domain has to redirect.

Domain change

The brand was renamed, or you bought a better domain. All the traffic of the old one moves to the new one.

Platform migration

Product URLs changed (for example, /product/blue-shirt became /blue-shirt/p). Each old URL should point to its new equivalent.

Removed page with a replacement

A product was discontinued and there is a new model. Redirect to the new one, not to the home page.

03

When to use a 302

Use a 302 when the original address will be used again, or when the destination changes often. Google keeps showing the original address in search results.

Campaigns

mystore.com/black-friday points to the campaign collection during the sale, and to another page afterwards.

Maintenance

A page or section is down for a few days, and visitors go to a notice instead.

QR codes and print

A QR code on a menu or a package that opens a path whose destination you will change over time.

Tests

You are trying a new page and haven't decided whether it stays.

If a 302 stays in place for a long time, Google may end up treating it as permanent. If the change became final, switch it to a 301.

04

Common mistakes

A 302 for a permanent change

The most frequent mistake when changing domains. Google takes longer to understand the move, and the new domain takes longer to inherit the old one's ranking.

Everything to the home page

In a migration, sending every old URL to the home page makes Google treat them as pages that no longer exist. Point each URL to its equivalent page.

Redirect chains

http://mystore.com → https://mystore.com → https://www.mystore.com → final page. Every hop slows the page down. Ideally the visitor reaches the destination in a single hop.

Removing the 301 too soon

Old links, bookmarks and search results are still out there. Keep the redirect for at least a year, and the root-domain one forever.

No HTTPS on the root domain

The redirect only happens after the browser opens a secure connection. If https://mystore.com has no SSL certificate, the visitor sees an error before being redirected. That's why the forwarding many registrars offer, which often only works over HTTP, doesn't solve it.

05

How to test

In a terminal, curl -I shows the status code and the destination without following the redirect:

Terminal
$ curl -I https://mystore.com
HTTP/2 301
location: https://www.mystore.com/

In the browser, open the developer tools (F12), go to the Network tab and visit the address: the first row shows the 301 or 302 status.

Browsers cache 301s. After changing a redirect, test in a private window to see the new behavior.

06

How to set it up on Redirect-301

On Redirect-301, each domain has its own redirect type, and each custom path can have its own. A typical store setup:

AddressDestinationType
mystore.comhttps://www.mystore.com301
mystore.com/black-friday/collections/black-friday302
mystore.com/whatsapphttps://wa.me/15551234567301

The SSL certificate is issued automatically, so the redirect also works with https://. The step-by-step with screenshots is in the configuration guide.

07

Frequently asked questions

Does a 301 hurt SEO?

No. It is exactly how Google recommends changing an address without losing your ranking.

Can I change a 301 to a 302 later?

Yes, but people who already visited the address may keep going to the old destination for a while, because their browser cached the 301. So use a 302 while you're not sure yet.

What about 307 and 308?

They are newer versions of 302 and 301 that make the browser repeat the same kind of request (important for APIs and forms). For store pages, 301 and 302 are enough.

How long should I keep a redirect?

At least a year for a domain change or migration. The root-domain-to-www one should stay forever.

← Back to homepage
Support

Need help?

Feel free to reach out to us with any questions. We're here to help! Scan the QR code or click the button below to join our WhatsApp group.

Open WhatsApp →
WhatsApp QR