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
-
Is 301 redirects a deal breaker for Migrating content or moving to new software?
I have this forum with about 2 million posts for 16 years on root of the domain. I am looking to switch softwares but the top ones won’t help setup 301 redirects. But I can still migrate all my members and all my content (threads/posts), would Google still reindex all our content or if we don’t setup redirects would it really kill our entire traffic for a long time or maybe just a month or so? I really want to migrate to software that isn’t forum based but rather something that offers courses, chat, live video streaming, subscription based etc. and this is the only way to do so OR to set it up on an entirely new domain OR subdomain but to me that is like starting all over from scratch? I could archive the forum to read only and set it up on subdomain or another root domain - then on the archived forum setup banners and a pop up linking to the new site or new subdomain? . This is such a hard decision for us as the current forum we have had for so many years has lost members posting from 1k a day to just a handful a day, our fb group though gets 1k a day so I’m trying to revive a site into something more modern and has all the training features we can offer as well.
Technical SEO | | vbsk1 -
301 redirect with Magento; still Page authority 0 after 6 weeks
Hi Mozzers! In December '14 I have execute a 301 redirect in the 'old' page in the admin of my Magento store. Now I was surprised to see that the Page Authority is still 0 of the new page 6 weeks after the execution. should I have seen the update of the PA on the new page already after 6 weeks of time? If yes, then I assume that my Magento didn't execute this properly? Old url: http://hippemamashop.nl/mama/boeken/fotoalbum.html
Technical SEO | | aznventure
New page: you will be redirected to the new page after clicking the old page Mm4uBEl0 -
301 redirect from Blogger
Hello, I have a client with a Wordpress network of blogs, each blog is owned by a different blogger. Many of them were migrated time ago from Blogger. I have seen that the way used to redirect them is a meta refresh, so no authority is being passed. I cannot find any reliable way of making a 301 from Blogger, There are some plugins, but I'm afraid of using them. Any of you have experience with this situation please? I have even thought about placing a global rel canonical before the meta refresh, but I think that here the problem is the meta refresh itself.... Thank you in advance
Technical SEO | | Juandbbam0 -
301 redirect
What is a proper way to redirect any url containing a give word (anywhere in the url) to another sepcified url? Is it like this? RedirectMatch 301 ^thisword$ http://domain.com/newlocation
Technical SEO | | sesertin1 -
Worth Changing Redirect From 302 to 301?
Hi, I'm doing an audit on a site that had a redesign in Dec 2009. For some reason I looked to see what kind of redirects were used from the old pages to the current ones, and it looks like they used 302s, which obviously isn't ideal. Given that it's been so long and those pages have looong since been de-indexed, is it worth me suggesting that they change those old redirects to 301s? My thinking is that if those old pages were linked to externally then I should recommend it, but I can't find any link info on Linkscape/OSE, Majestic SEO or YSE. Any comments appreciated.
Technical SEO | | The_Heavies0 -
Joomla 301 redirects
hi i am using joomla sef404 and i have 7000 not found pages in my webmaster google tool page. the trouble is i got rid of a lot of pages and also components so now i am left with loads of not found pages. what i want to try and do is to create 301 redirects so that i do not lose page rank. can anyone please let me know how to do this step by step please
Technical SEO | | ClaireH-1848860 -
301 Redirects
Hello, I have a problem with my website. I have a page on my website http://www.ensorbuilding.com/page.php/aboutus but if i type in www.ensorbuilding.com/page.php/aboutus/f8e45e9d9df6140bb5a7ff1173e8d828 or www.ensorbuilding.com/page.php/aboutus/0f0eea5e9ab0a3e8d91fad8fc0d3ce9c it still displays the about us page. Google is seeing this as duplicate content so what I would want to do is 301 redirect anything after www.ensorbuilding.com/page.php/aboutus . How could I implement a 301 redirect in this way?
Technical SEO | | danielmckay70 -
What are the SEOmoz-suggested best practices for limiting the number of 301 redirects for a given site?
I've read some vague warnings of potential problems with having a long list of 301 redirects within an htaccess file. If this is a problem, could you provide any guidance on how much is too much? And if there is a problem associated with this, what is that problem exactly?
Technical SEO | | roush0