A Client Changed the Link Structure for Their Site... Not Just Once, but Twice
-
I have a client who's experiencing a number of crawl errors, which I've gotten down fo 9,000 from 18,000. One of the challenges they experience is that they've modified their URL structure a couple times.
First it was: site.com/year/month/day/post-name
Then it was: site.com/category/post-name
Now it's: site.com/post-nameI'm not sure of the time elapsed between these changes, but enough time has passed that the URLs for the previous two URL structures have been indexed and spit out 404s now.
What's the best/clean way to address this issue?I'm not going to create 9k redirect rules obviously, but there's got to be a way to address this issue and resolve it moving forward.
-
That looks like a very useful plugin Keri
-
Look for the "Redirection" plugin for Wordpress, that can help you make redirects easily. It's also an easy way to let you see what's a 404 on your site, and make redirects from the page listing the 404s.
-
Sure, here's the mod_rewrite guide straight from the horse's mouth
http://httpd.apache.org/docs/2.0/misc/rewriteguide.htmlHere's a nice beginner's guide:
http://www.addedbytes.com/for-beginners/url-rewriting-for-beginners/...with a little cheatsheet for some of the common commands:
http://www.cheatography.com/davechild/cheat-sheets/mod-rewrite/ -
Wow guys! Thanks for the responses. You've given me a couple things to think about.
The suggestions from Thomas and GYMSN might be the way I choose to plod ahead. Though, the rewrite rule seems like an interesting play. I have no idea what either of those lines mean. Heh. Is there a reference you could recommend, Woj, that might shed more light on rewrite rules?
A couple technical pieces to throw out there:
1. It's a WordPress site, so they don't have "folders," per se.
2. They run on linux, with an apache web server
-
Ryan is absolutely spot on.. you can create some redirection rules in the .htaccess (assuming the site's on apache)
something along the lines of..
RewriteRule ^([0-9]{4})/([0-9]{2})/([0-9]{2})/(.*)$ /$4 [R=301,NC,L]
RewriteRule ^category/(.*)$ /$1 [R=301,NC,L]
(of course if totally depends on your site structure & I'd test these on a staging server if possible)
-
Thomas did what we did and it worked fine. We lost a ton of Yahoo rankings for significant keywords though. I now personally never change /url/keywords unless I don't care about the Yahoo traffic (or there is none). Google has no problem with it.
-
You could do this with one or two clever regex commands, the composition of which I can't think of cos its too close to quitting time on Friday. But yeah you don't need 9000 rules.
-
Have you tried creating a redirect rule for each of the folders? From you example above the "post-name" has remained consistent. Therefore if you create a redirect from each folder then you should see a proper resolution with just appending the "post-name"
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
-
How to change URL structure in google webmasters
Is there any way to ask google to indexed the website in following URL structure abc.com/category/postname (I have this structure on my website) But Currently google indexed my website posts as - abc.com/postname/category How I can tell google to follow the right structure?
Intermediate & Advanced SEO | | Michael.Leonard0 -
Drip Feeding Free Top 10 Blog Sites for Link Building?
Is it a good move to pick 10 free blogging sites to build links. Like drip feeding them. Let's say 10 blogging sites irrespective of its a sub-domain as we get in wordpress or a sub-folder blog as we get in livejournal. Now adding articles related to my money website on those blogs newly created & building links from them. Then drip feeding them by putting 1 article a month at regular intervals with anchor as links in each of them. Do you think its a good move?
Intermediate & Advanced SEO | | welcomecure0 -
How do you 301 redirect URLs with a hashbang (#!) format? We just lost a ton of pagerank because we thought javascript redirect was the only way! But other sites have been able to do this – examples and details inside
Hi Moz, Here's more info on our problem, and thanks for reading! We’re trying to Create 301 redirects for 44 pages on site.com. We’re having trouble 301 redirecting these pages, possibly because they are AJAX and have hashbangs in the URLs. These are locations pages. The old locations URLs are in the following format: www.site.com/locations/#!new-york and the new URLs that we want to redirect to are in this format: www.site.com/locations/new-york We have not been able to create these redirects using Yoast WordPress SEO plugin v.1.5.3.2. The CMS is WordPress version 3.9.1 The reason we want to 301 redirect these pages is because we have created new pages to replace them, and we want to pass pagerank from the old pages to the new. A 301 redirect is the ideal way to pass pagerank. Examples of pages that are able to 301 redirect hashbang URLs include http://www.sherrilltree.com/Saddles#!Saddles and https://twitter.com/#!RobOusbey.
Intermediate & Advanced SEO | | DA20130 -
Change domain whilst under a partial manual links penalty
Hi there We're currently under a manual penalty for some unnatural links to our domain and have been working on fixing that but had our first re-consideration request rejected so we're doing a second round of link removals The issue we have is that we were planning to change our domain before the SSL certificate expires in a couple of weeks and renew the certificate with the new domain but are unsure whether to stop working on the reconsideration request, change the domain and wait until the manual penalty moves to the new domain before continuing the link removal. Alternatively try and use the domain change to select which links are 301'd to the new site and leave behind the bad links in the hope that the manual penalty wouldn't be applied to the new domain Any thoughts or advice would be appreciated
Intermediate & Advanced SEO | | Ham19790 -
Site Structured Navigated by Cookies
Is it advisable to have a site structure that is navigated via URLs rather than cookies? In a website that has several location based pages - each with their own functions and information? Is this a SEO priority? Will it help to combat duplicate content? Any help would be greatly appreciated!
Intermediate & Advanced SEO | | J_Sinclair0 -
Redirecting one site to another for link juice
I have two sites with same theme - buying cars. I am going remove one of the sites from being crawled permenantly (ie junkthecars.com) and point domian via 301, to another similar theme site (sellthecars.com). The purpose is to simply pass the SEO link juice from one site to the other as we retire junkthecars.com.... Is a forwarding of the domain OK and the best way for the search engines to increase the rank of sellthecars.com (we hate to wast the link work done on Junkthecars.com)? What dangers should I look for that could hurt sellthecars.com if we do the redirect at a simple TLD?
Intermediate & Advanced SEO | | bestone0 -
Are Navigation links different to static links
We are trying to reduce the number of links on our homepage. We could remove some fly out navigation links, We rank 1st on Google for some of these links. Would removing these hurt our SEO. The links are accessible 1 level down if we remove the homepage.
Intermediate & Advanced SEO | | Archers0 -
Best possible linking on site with 100K indexed pages
Hello All, First of all I would like to thank everybody here for sharing such great knowledge with such amazing and heartfelt passion.It really is good to see. Thank you. My story / question: I recently sold a site with more than 100k pages indexed in Google. I was allowed to keep links on the site.These links being actual anchor text links on both the home page as well on the 100k news articles. On top of that, my site syndicates its rss feed (Just links and titles, no content) to this page. However, the new owner made a mess, and now the site could possibly be seen as bad linking to my site. Google tells me within webmasters that this particular site gives me more than 400K backlinks. I have NEVER received one single notice from Google that I have bad links. That first. But, I was worried that this page could have been the reason why MY site tanked as bad as it did. It's the only source linking so massive to me. Just a few days ago, I got in contact with the new site owner. And he has taken my offer to help him 'better' his site. Although getting the site up to date for him is my main purpose, since I am there, I will also put effort in to optimizing the links back to my site. My question: What would be the best to do for my 'most SEO gain' out of this? The site is a news paper type of site, catering for news within the exact niche my site is trying to rank. Difference being, his is a news site, mine is not. It is commercial. Once I fix his site, there will be regular news updates all within the niche we both are in. Regularly as in several times per day. It's news. In the niche. Should I leave my rss feed in the side bars of all the content? Should I leave an achor text link on the sidebar (on all news etc.) If so: there can be just one keyword... 407K pages linking with just 1 kw?? Should I keep it to just one link on the home page? I would love to hear what you guys think. (My domain is from 2001. Like a quality wine. However, still tanked like a submarine.) ALL SEO reports I got here are now Grade A. The site is finally fully optimized. Truly nice to have that confirmation. Now I hope someone will be able to tell me what is best to do, in order to get the most SEO gain out of this for my site. Thank you.
Intermediate & Advanced SEO | | richardo24hr0