Skip to content
Free website migration on every plan, done by our team.Learn more ›
Performance

301 vs 302 redirects: when to use each

The difference between 301 (permanent) and 302 (temporary) redirects, how each affects SEO, and how to set them up in cPanel, .htaccess or WordPress.

Short answer: Use a 301 redirect when a page or domain has moved permanently. Search engines then transfer the old URL's ranking signals to the new one. Use a 302 only for genuinely temporary moves, such as a short promotion or maintenance page.

The difference

301 Moved Permanently302 Found (temporary)
MeaningThe old URL is gone for goodThe old URL will return
SEOSignals move to the new URLThe old URL stays indexed
Typical useNew domain, renamed pages, http to httpsShort campaigns, A/B tests, maintenance

Common situations

  • Changing domain: 301 every old URL to the matching new URL, not just to the home page.
  • Switching to HTTPS: 301 from http to https.
  • Combining www and non-www: 301 one version to the other.
  • Renaming a page: 301 the old address to the new one.
  • Merging two domains such as a .com and a .com.ng: 301 one to the other. See .com vs .com.ng vs .ng.

How to set them up

In cPanel

Open Redirects, choose 301 or 302, enter the old path and the new address, and save.

In .htaccess (Apache or LiteSpeed)

Redirect 301 /old-page/ https://yourbusiness.com/new-page/

In WordPress

Use a redirect plugin to manage redirects without editing files.

Mistakes to avoid

  • Redirect chains (A to B to C): point straight to the final URL.
  • Redirecting everything to the home page, which loses relevance.
  • Leaving temporary 302s in place for months.

Frequently asked questions

Do 301 redirects lose SEO value?

Modern search engines pass ranking signals through 301s; keeping redirects simple and direct helps.

How long should I keep redirects after a domain change?

At least a year, and ideally permanently while you own the old domain.

Is a meta refresh the same as a redirect?

No. Server-side 301 or 302 redirects are clearer for search engines and faster for visitors.

Ready when you are

Host it where it performs

NVMe speed, offshore privacy and a written SLA — live in minutes on AuroxHost.