Reputation: 1386
I'm rebuilding a Wordpress site with lots (thousands) of re-directs. I changed the URL structure from example.com/unique# to example.com/year/month/newtitle
I have a script (php) that digests unique# into year/month/newtitle via the middle-man url: example.com/redirector.php?unique#
Currently, the flow is:
example.com/unique# ----301----> example.com/redirector.php?unique# ----302----> example.com/year/month/title
I feel this is killing me in SEO, but can't pinpoint why? Should they both be 301 redirects? Is there a more elegant way to redirect without the middle-man URL?
Upvotes: 0
Views: 1021
Reputation: 403
A 301 redirect is a "permanent" redirect while a 302 is a "temporary" redirect. If the content has permanently moved to the new URL you should be using a 301 redirect - you won't be transferring any SEO benefit from the old page to the new page with a 302 redirect.
In your example, this means your middle man URL will be getting the benefit but then this isn't being transferred to the final URL.
Here's a great article on the difference between 301 and 302 redirects for SEO.
Also, Google doesn't like redirect chains and you'll lose some SEO benefit for each link in the chain.
You'd be better off redirecting the original to the final (or both URLs if the middle man URL has been indexed) to the new URL.
For example: /old-URL -> /middle-man-URL -> /new-URL
Should change to:
/old-URL -> /new-URL
/middle-man-URL -> /new-URL
Here's an article details the SEO implications of redirect chains.
Hope this helps.
Upvotes: 4