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
-
Pages with 301 redirects showing as 200 when crawled using RogerBot
Hi guys, I recently did an audit for a client and ran a crawl on the site using RogerBot. We quickly noticed that all but one page was showing as status code 200, but we knew that there were a lot of 301 redirects in place. When our developers checked it, they saw the pages as 301s, as did the Moz toolbar. If page A redirected to page B, our developers and the Moz toolbar saw page A as 301 and page B as 200. However the crawl showed both page A and page B as 200. Does anyone have any idea why the crawl may have been showing the status codes as 200? We've checked and the redirect is definitely in place for the user, but our worry is that there could be an issue with duplicate content if a crawler isn't picking up on the 301 redirect. Thanks!
Technical SEO | | Welford-Media0 -
Moving Blog and 301 Redirect Advice
Hello Moz Community, We recently moved our blog from its own domain to a directory on our website. We do not plan on moving over all the old blog posts because a majority most of them are based on events or time-sensitive information that has passed. We need advice on what to do with all of the old blog URL's? Should we just 301 all of them to the new blog directory on our website (www.domain.com/blog)? Should we take the time to move over all the old blog content and put the appropriate 301's in place? Any and all advice would be greatly appreciated. Thank you in advance.
Technical SEO | | All-Star-Vacation-Homes
Best,
Rich0 -
Increase 404 errors or 301 redirects?
Hi all, I'm working on an e-commerce site that sells products that may only be available for a certain period of time. Eg. A product may only be selling for 1 year and then be permanently out of stock. When a product goes out of stock, the page is removed from the site regardless of any links it may have gotten over time. I am trying to figure out the best way to handle these permanently out of stock pages. At the moment, the site is set up to return a 404 page for each of these products. There are currently 600 (and increasing) instances of this appearing on Google Webmasters. I have read that too many 404 errors may have a negative impact on your site, and so thought I might 301 redirect these URLs to a more appropriate page. However I've also read that too many 301 redirects may have a negative impact on your site. I foresee this to be an issue several years down the road when the site has thousands of expired products which will result in thousands of 404 errors or 301 redirects depending on which route I take. Which would be the better route? Is there a better solution?
Technical SEO | | Oxfordcomma0 -
301 Redirects
Hi, I ran the seomox link report and see that I have an entry for our home page (http://www.trophycentral.com/) and http://www.trophycentral.com/index.html. The index is shown with a 301 redirect. Does this mean that a redirect is already in place to http://www.trophycentral.com/? I want to ensure our traffic is not being split between the two urls, but not sure how to confirm this. Thanks! <colgroup><col width="294"></colgroup><colgroup><col width="81"></colgroup><colgroup><col width="80"></colgroup><colgroup><col width="77"></colgroup><colgroup><col width="214"></colgroup>
Technical SEO | | trophycentraltrophiesandawards
| URL | HTTP Status | Total Links | Page Authority | Number of Linking Root Domains |
| http://www.trophycentral.com/ | 200 | 5746 | 53 | 244 |
| http://www.trophycentral.com/index.html | 301 | 5123 | 42 | 4 |1 -
How long will Google take to stop crawling an old URL once it has been 301 redirected
I need to do a clean-up old urls that have been redirected in sitemap and was wondering about this.
Technical SEO | | Ant-8080 -
Will 301 redirecting a site multiple times still preserve the original site value?
Hi, All! If site www.abc.com was already 301 redirected to site www.def.com, and now the site owner wants to redirect www.def.com to www.ghi.com - is there any concern that it's not going to work, and some of the original linkjuice, rank, trust, etc. is going to vanish? Or as long as the 301s are set up right, should you be able to 301 indefinitely? Does anyone have any experience with actually doing this and seeing good/bad/neutral results? Thanks in advance! -Aviva B
Technical SEO | | debi_zyx0 -
301 Redirects - SEO Benefit?
Hello, Years ago, our company started out as a Yahoo store. We've since moved onto another website with its own shopping cart but since the Yahoo store is almost 10 years old, there's a lot of history there and it still exists with the occasional order. We currently use it for reputation management purposes with links to our real ecommerce site but we're thinking of just redirecting the Yahoo store to our ecommerce site. Is there any SEO benefit in doing this? We were also kind of penalized by Panda. Would this help us out at all (the descriptions on both sites could be considered duplicate content).
Technical SEO | | airnwater0 -
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