Ad

SEO URL Redirection Using PHP

- 1 answer

I want to know what is best SEO redirection, 301 or 302?

I want to redirect some URL to PayPal purchase page, What the best 301 or 302?

For example:

I want to redirect this link:
    http://example.com/?product_id=123
To PayPal purchase page:
https://www.paypal.com/xxxxxxxxetc...

301 or 302?

Thanks.

Ad

Answer

The rules have changed (at least for Google)

It used to be 301 Redirection, but Google's John Mueller announced in February 2016 that it doesn't matter anymore:

Do I lose "link juice" from the redirects?

No, for 301 or 302 redirects from HTTP to HTTPS no PageRank is lost.

So what should I use?

Since the SEO doesn't matter, you should use the HTTP codes as advertised:

  • 301 for permanent redirections

  • 302 for temporarily redirections

For more info check out moz.com on redirection rules for seo where you'll also find this picture

enter image description here

Ad
source: stackoverflow.com
Ad