Setting up a 301 redirect from expired webpages
-
Hi Guys,
We have recently created a new website for one of our clients and replaced their old website on the same domain. One problem that we are having is that all of the old pages are indexed within Google (1000s) and are just getting sent to our custom 404 page. We are finding that there is an large bounce rate from this and also, I am worried from an SEO point of view that the site could lose rank positioning through the number of crawl errors that Google is getting.
Want I want is to set up a 301 redirect from these pages to go to the 'our brands' page. The reason for this is that the majority of the old URLs linked to individual product pages, and one thing to note is that they are all .asp pages.
Is there a way of setting up a rule in the htaccess file (or another way) to say that all webpages that end with the suffix of .asp will be 301 redirected to the our brands' page? (there is no .asp pages on the new site as it is all done in php).
If so, I would love it if someone could post the code snippet. Thanks in advance guys and if you have any other ideas then be my guest to suggest
Matt.
-
Make sure and back up you .htaccess before making any changes...
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^(.*).asp$ $1.php [R=301,L]Would convert all asp to php
but this would only work if you kept your directory structure the same
Example
Old Structure http://www.somedomain.com/about.asp
New Structure http://www.somedomain.com/about.php
If you did not you will need to do it manually for each page
Redirect 301 /about.asp http://www.somedomain.com/about-Us.php
If there are spaces, be sure to use quotes
Redirect 301 "/about us.asp" http://www.somedomain.com/about-Us.php
There could be other easier ways, but if I read correctly above, this would be my suggestions
And of course as TIm suggests above, the proper SEO process would be manually for each page, redirecting to its proper counterpart (if it is indexed, and has links pointing to it or a User Experience page)
Shane
-
To answer your question directly - yes, there's a rule to put in .htaccess for this. It would be something like:
RewriteRule (.*).asp$ http://www.link.to/ourbrandspage (someone who knows regex better may correct me on this)
However, redirecting everything to the same page is a bit of a waste - if the site has been around for a long time, then there may be inbound links to deep pages in the site which would be better off being redirected to the appropriate page on the new URL structure rather than dumping everyone on the same page.
If there's a pattern match which you can follow, then you can write regex to cope with this (e.g. if the old structure was http://www.whatever.com/blah.asp and the new one is http://www.whatever.com/blah.php then just do an .htaccess redirect from *.asp to .php - something like RewriteRule (.).asp $1.php). However, I'm going to bet it's not that simple.
Best is to do a proper map of existing links so you can direct the actual old URL to the most relevant URL on the new site.
I've had to do this kind of "emergency redirect fix" before, for sites with a lot of pages and no neat "pattern match" fix. The way I usually approach it is to try and get a list of the existing URL structure (either: from a back up version of the site, from Google analytics, from webmaster tools or at a pinch you can scrape the SERPs) to grab all the possible/indexed URLs and stick them in a spreadsheet. I then prioritise the highest traffic pages - if you can see via Google Analytics (or server logs) which pages get the most inbound traffic, redirect those first to the most appropriate page on the new structure. That way you can carry on adding new rules into the .htaccess as you go along - you'll probably find of the 1000s of old pages, there's a relatively small %age which get the vast majority of inbound traffic.
Hope this helps!
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
-
Buying a domain to 301 redirect for increased rankings
A large competitor has recently purchased a large marketing company that specializes in their industry. As a part of this acquisition they obtained ownership of www.digitalsherpa.com, which is now 301 redirecting some 50K links to www.costar.com/. When I did a site:www.digitalsherpa.com search all of the origin URLs had title tags from the costar site in place of their own. My question is: Does this violate Google spam guidelines? search?sourceid=chrome-psyapi2&ion=1&espv=2&ie=UTF-8&q=site%3Adigitalsherpa.com&oq=site&aqs=chrome.0.69i59j69i57j69i65j69i60j0l2.1919j0j7
Technical SEO | | Reis_Inc.0 -
301 redirect question
Hi Everyone When doing 301 redirects for a large site, if a page has 0 inbound links would you still redirect it or just leave it? Im just curious on the best practice for this Thanks in advance
Technical SEO | | TheZenAgency0 -
301 Redirect Best Practices
Hi SEOs, Question about ranking/redirects. If I have a particular page that is already ranking for a couple KWs in top SERPs, but know there are higher volume KWs I can optimize for should I just leave it as is or change the URL key and redirect for the time being until Google re-indexes. Example:
Technical SEO | | IceIcebaby
current URL: www.example.com/action/best-movies
new URL: www.example.com/action/best-action-movies
(the current would be ranking for "best action moves" whereas the new would include the actual "best action movies" KW) Let me know if I can clarify, thank you!0 -
How does this rank? - a page that is 301 redirected
How does a 301ed page rank in google? In google I searched for" ikea.ca" which is set up as a 301 redirect to www.ikea.com/ca/en and was surprised to see the url --> www.ikea.ca actually ranking. IKEA Canada <cite>ikea.ca/</cite>IKEA Featuring Scandinavian modern style furniture and accessories. Include storage options, lighting, decor products, kitchen appliances and beds. Bedroom - Kitchen - Living Room - IKEA North York
Technical SEO | | Morris770 -
Two companies merge: website A redirect 301 to website B. Problems?
Hi, last december the company I work for and another company merged. The website of company A was taken offline and the home page was 302 redirected to a page on website B. This page had information about the merger and the consequences for customers. The deeper pages of website A were 301 redirected to similar pages on website B. After a while, the traffic from the redirected home page decreased and we thought it was time to change the redirect from a 302 into a 301 redirect to the home page. Because there are still a lot of links to the home page of website A and we wanted to preserve the link juice. Two weeks ago we changed the 302 redirect from website A into a 301 redirect to the home page of website B. Last week the Google webmaster tools account of website B showed the links from the 301 redirected website A. The total amount of links doubled and the top anchor text is the name of company A instead of company B. This, off course, could trigger an alarm at Google. Because we got a lot of new links with a different anchor text. A tactic used by spammers/black-hats. I am a bit worried that our change will be penalized by Google. But our change is legit. It is to the advantage of our customers to find us if they search for the name of company A or click on a link to website A. We didn´t change the change of address of domain A in Google webmaster tools yet. Is it a good idea to change the change of address of domain A into domain B? Are there other precautions we can take?
Technical SEO | | NN-online0 -
301 Redirect Questions
I have a site I built on a wisiwig editing platform that will not allow a 301 redirect. The site has already been remade and I need to point it to another domain. To do the redirect, can I change it to another domain host that will allow a 301 or will that make me loose the authority of the site? I may not be able to move the content of the site. Please help.
Technical SEO | | photoseo10 -
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!!!!
Technical SEO | | EntrustSEO0