301 Redirect Issue
-
I'm having an issue with 301 redirects:
Let's see if I can verbalize my thoughts on this one...
So we just recently moved our site to Wordpress. One of our new 301 commands is redirecting oursite.com/news to oursite.com/blog . However there are other links from our previous site that look like oursite.com/news/XYZ and the issue is that, because wordpress structures its links differently, that URL is not equivalent to oursite.com/blog/XYZ. Instead, it might look something more like oursite.com/blog/yaddayadda/XYZ or something. Does that make sense?
The issue is that when I find an old link of ours on google that looks something like "oursite.com/news/XYZ" or "oursite.com/news/ABC" it is automatically replacing "news" with "blog". When I try to go in manually and redirect anything that says "/news/XYZ" to "/blog/yaddayadda/XYZ" it still doesn't work. It still just replaces "news" with "blog."
Wow I realize that might not make sense to anyone but if it does - please advise!!
Thanks!!!!
-
I did try that. Not sure why it isn't working but I think it has something to do with Tom's answer below. Heh. Thanks though Daniel!!
-
Wow thanks so much. This might be way over my head (I know very little about web development) but I'm going to talk to our devs about it. Thanks again!!
-
Ah you have a parameter in the old URL. That ? is the real trick here. because you redirected /news to /blog it will redirect /news?anythingyouputhere to /blog?anythingyouputhere if that makes sense.
Did you try to redirect /blog?tag=business-2 to /blog/category/business yet?
-
Hi!
The problem you have is that you are using two different Apache extensions and I don't believe you can control the order the go in. You are using mod_alias and mod_rewrite.
It sounds like you have a line like:
Redirect permanent /news/dinosaur/ninja http://www.oursite.com/blog/ninja
This is the mod_alias rule, and it is firing before your mod_rewrite rules (and then it no longer fits their criteria, so they don't fire).
So, what you need to do is change your mod_alias rules into mod_rewrite rules, so then you can control the order (they execute top to bottom, so you just put your 'specific' redirects above your general ones). You rule should look something like this (I've not confirmed!):
RewriteRule ^/news/dinosaur/ninja/$ /blog/ninja/ [L,R=301]
I hope all that make sense. Let me know how you get on!
-
Hey Daniel. Thanks for your response - the only problem is that we already have /%postname% selected. It is working for mostly every blog entry except this one that I'm running into problems with. I'll show you the exact URL that's giving us the problem.
On google, it shows the URL as:
oursite.com/news?tag=business-2
Then it seems to be redirecting it to:
oursite.com/blog?tag=business-2
However, that site does not exist. It should be
http://oursite.com/category/business
I tried to literally 301 redirect both oursite.com/news?tag=business-2 and http://oursite.com/category/business to http://oursite.com/category/business but neither worked.
Thoughts?
-
It sounds like more of a permalink issue in wordpress than a redirect issue. Under settings on the left sidebar in your wordpress dashboard is a link called permalinks. Go there and let us know what it says there. You probably want a custom structure that says /%postname%/ so that your blog will make permalinks like site.com /blog/postname instead of site.com /blog/category/postname or whatever else might be going on there.
Get the simple 301 redirect plugin and make sure you do redirect every old URL to its new counterpart, but make sure your new ones look the way you want first.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
301 and 200 Status Issues
Hi, Moz has highlighted that we have duplicate page content on our site, displaying the following: http://bmiresearch.com/press 200 status code and http://www.bmiresearch.com/press 200 status code We have setup a 301 redirect rule on http://bmiresearch.com/press to permanently redirect to http://www.bmiresearch.com/press and on Google inspect element network it shows this http://bmiresearch.com/press 301 status code which mean redirect to this URL permanently http://www.bmiresearch.com/press 200 status code Does anyone know why this might be occuring? Is it possible that because Google has index both URL http://www.bmiresearch.com/press and http://bmiresearch.com/press with 200 status code? If so how would we correct this? Thanks
Technical SEO | | carlsutherland0 -
Can you 301 redirect a page to an already existing/old page ?
If you delete a page (say a sub department/category page on an ecommerce store) should you 301 redirect its url to the nearest equivalent page still on the site or just delete and forget about it ? Generally should you try and 301 redirect any old pages your deleting if you can find suitable page with similar content to redirect to. Wont G consider it weird if you say a page has moved permenantly to such and such an address if that page/address existed before ? I presume its fine since say in the scenario of consolidating departments on your store you want to redirect the department page your going to delete to the existing pages/department you are consolidating old departments products into ?
Technical SEO | | Dan-Lawrence0 -
My home page 301 redirects - is this an SEO problem
When ever a browser calls my site canineconcepts.co.uk, it is automatically 301 redirected to canineconcepts.co.uk/en I am not sure if I should be concerned about this from an SEO perspective or not. Any thoughts?
Technical SEO | | CanineConcepts0 -
How many jumps between 301 redirects is acceptable?
For example, I have a page A that should be redirected to page D, but instead A redirects to B, B redirects to C and C redirects to D. It's something I came across and wondering if its worth the dev time to change it. Thanks!
Technical SEO | | pbrothers240 -
301 redirect from domain to home.aspx
We have been asked to look at a website and have found a 301 redirect from the domain www.domain.com to www.domain.com/home.aspx. Why would someone do this, this way round? We can't think of a good reason and are wondering if we have overlooked something? Thanks for your help.
Technical SEO | | travelinnovations0 -
200 Redirects for SEO instead of 301
We are working with a company on re-platforming our website. On a call yesterday they outlined a strategy to use 200 redirects for our top keywords instead of 301s. I am not familiar with this type of redirect and was wondering if anyone could provide some more insight.
Technical SEO | | EvergladesDirect0 -
IIS Server Load for 500 Page Level 301 Redirects
We are migrating content from 10 sub domains to our www site. On an IIS sever, what is potential server load impact, if any, for setting up 500 plus page level redirects?
Technical SEO | | DigitalMkt0