How long should I keep the 301 redirect file
-
We've setup an new site and many pages don't exist anymore (clean up done). But for many of them we have new pages with new url's. We've monitored the 404 and have now many URL's redirected with 301 (apache file).
How long should we keep this in place? Checking all links manually to see of new url is in place of the old url (in google) is too much work.
tx!
-
Unless there's a reason to take the 301s down, don't.
If you don't want to have to wade through them all when you're editing your .htaccess file you could monitor your server logs which should show all requests & responses your server receives & sends. When no requests for a URL, (and therefor no 301 responses happen), come in for some long period of time, (a month? 6 months? a year?), then you may be able to safely remove the 301 directive from your .htacess, (or wherever you configure your 301s).
-
This is also bad idea.
.htaccess have parameter with enable or disable subdirectory .htaccess override - AllowOverride. And this can kill all Apache performance! Why?
Let you browse /index.html Apache will parse .htaccess, execute rules and return /index.html. This is normal case scenario - with one .htaccess. But if you browse /subdir1/subdir2/subdir3/subdir4/subdir5/blah.jpg this is BAD! Apache will parse /.htaccess then /subdir1/.htaccess then /subdir1/subdir2/.htaccess .... subdir1/subdir2/subdir3/subdir4/subdir5/.htaccess and then blah.jpg.
Remember! Apache doesn't cache .htaccess. They're loading, parsing and executing on each resource loaded. And when you access 2nd resource - they make this over and over.
It's much better if you make static configuration in httpd.conf because this configuration is loading on startup only and there you can define <site><directory><resource>for each of them.</resource></directory></site>
Other modern webservers also used static config - nginx, lighttpd, etc.
-
Not possible here, since the structure changed for 100%
-
Im with you EGOL.
Keep the redirect files as deep as possible.And no, there's no limit on the quantity of 301's
-
Some people place all of their 301 in the root .htaccess folder. I think that is a bad idea.
Mine are in subfolders, as deep within them as possible. I believe that reduces work on the server.
-
My 301s will still be up when I attend my own funeral.
I am old enough that the web will still exist, but for you maybe not.
I need to add an item to my business succession plan about 301s. Thanks for the reminder.
-
Can one have to many 301's? Can list be too long?
-
Hi KBC,
there I dont see that the follow up on the URL update on SERPs should be a problem. Have you tried using 'site:yoursite.com' query?
About the 301 redirect, I wuold keep it as many time as possible. There will be no harm at all when all URL are updated.
Hope this helps you.
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 redirect hops from non-https and www
It's best practice to minimize the amount of 301 redirect hops. Ideally only one redirect hop. It's also best practice to 301 redirect (or at least canonical) your non-https and/or your non-www (or www) to the canonical protocol/subdomain. The simplest (and possibly the most common) way to implement canonical protocol/subdomain redirects is through a load balancer or before your app processes the request. Both of which will just blanket 301 to the canonical domain/protocol regardless if the path exists or not In which case, you could have: Two hops. i.e. hop #1 http://example.com/foo to https://example.com/foo, hop #2 https://example.com/foo to https://example.com/bar 301 to a 404. Let's say https://example.com/dog never existed, but somebody for whatever reason linked to it (maybe a typo). If I request https://www.example.com/dog, the load balancer would 301 to a 404 page. Either scenario above should be fairly rare. However, you can't control how people link to you. Should I care about either above scenario? I could have my app attempt to check if the page exists before forwarding, but that code could be complicated.
Intermediate & Advanced SEO | | dsbud0 -
Client would like to 301 redirect the homepage to a category page
Hello MOZ Community!!! I would like your expert opinions on a scenario, please! My client is an ecommerce company, and currently has one of its category pages outranking its homepage for a few key phrases. The homepage, however, has a better conversion rate. So, the client is asking that we make the homepage the category URL, so http://www.theirsite.com/blue-clothes. The existing homepage URL - http://www.theirsite.com - would 301 REDIRECT to the category page - which would render the current version of the homepage. Therefore, there would be nothing, ZERO content, on the MAIN URL: http://www.theirsite.com Has anyone ever done this before? What are the pros and the cons of this practice? Here is my same client, for reference: https://moz.com/community/q/issue-with-category-ranking-on-page-1-vs-homepage-ranking-on-page-2
Intermediate & Advanced SEO | | accpar0 -
301 v/s 302 Redirection on Homepage (Multilingual)
Hello, Our website: http://www.luxresorts.com currently has a default 302 redirection to http://www.luxresorts.com/en. We would like to do a 301 redirection instead of a 302 to http://www.luxresorts.com. Our concern is that the site is multilingual and we wonder what effect would the 301 redirection have on search engine crawlers and how would this appear on SERP. When a search is done on Google.com, the English version of our website appears and when on Google.FR, the French version appears. Would the 301 redirection change the way our website appear on Google? Grateful if you could help us out in understanding the pros and cons/best practices for our concern. Thanks in advance. Tej Luchmun.
Intermediate & Advanced SEO | | luxresorts0 -
After 301 redirects average rankings went down a little. Any idea?
We have changed the design of a website, from an oscommerce site to a new responsive website with customized programming. After the 301 redirects we have lost 1 to 2 positions in Google Rankings of the most visited categories. This are real data <colgroup><col span="5" width="80"></colgroup>
Intermediate & Advanced SEO | | teconsite
| page | brand | page | CTR | average position |
| old | fagor | http://www.electrorecambio.es/tienda/fagor-m-41.html | 15% | 6,6 |
| new | fagor | http://www.electrorecambio.es/fagor | 13% | 7,2 |
| old | teka | http://www.electrorecambio.es/tienda/teka-m-39.html | 12% | 7,2 |
| new | teka | http://www.electrorecambio.es/teka | 9% | 8,8 |
| old | balay | http://www.electrorecambio.es/tienda/balay-m-81.html | 12% | 7,4 |
| new | balay | http://www.electrorecambio.es/balay | 11% | 8,6 |
| old | bosch | http://www.electrorecambio.es/tienda/bosch-m-44.html | 10% | 7,4 |
| new | bosch | http://www.electrorecambio.es/bosch | 8% | 11 | Edited: As this table is not shown properly I have added an image For you to check the old page you can see the old urls in the folder tienda2. For example http://www.electrorecambio.es/tienda/bosch-m-44.html can be checked in http://www.electrorecambio.es/tienda2/bosch-m-44.html I would like to know if you see any important information that could justify this drop down in rankings Thanks!!! data-webmaster-tools.jpg1 -
Language Detection redirect: 301 or 302?
We have a site offering a voip app in 4 languages. Users are currently 302 redirected from the root page to /language subpages, depending on their browser language. Discussions about the sense of this aside: Is it correct to use a 302 redirect here or should users be 301 redirected to their respective languages? I don't find any guideline on this whatsoever...
Intermediate & Advanced SEO | | zeepartner1 -
301 redirect
Hi there, I have some good links pointing to one of my web pages at the moment, however we are just about to launch a new design with new URL structure and I am clear that I need to do a 301 redirect on the URL to the new URL. However, do I keep the old URL live forever? or can I remove it after a while? Kind Regards
Intermediate & Advanced SEO | | Paul780 -
301 redirects from old to new pages whit a lot of changes
Hello all, We are going to restyle and change CMS so all the urls will change. We are also updating content, adding much more content to the old pages trying to be more user and SEO friendly. My doubt is about doing 301 redirects from old to new pages when the content has changed a lot. Does it will mantain the ranking of the page or will crawlers thought that is a total diferent page. For example: one page new page will change from the old one the url, title, headers, meta description, content text and images. Should i maintain old content and do the CMS change with the 301 redirects and later change the content, that means a lot of work, or do it all at once? Thanks in advance Tomas
Intermediate & Advanced SEO | | tomas.guemes0 -
How long is it safe to use a 302 redirect?
Hi All, Lets assume there is site A and site B, both sites are live on the internet today as standalone businesses, but they sell very similar products. Site B has built up some link equity and will eventually become the domain for site A due to an organisational re-brand. For the time being however site A will remain, but site B needs to disappear temporarily, but not lose the link equity which has been built up against it. My current thinking is to 302 redirect site B to site A such that users and search bots accessing site B will be redirected to site A whilst leaving the link equity that exists against site B fully intact and allowing us to continue to grow it should we wish to. The question is, does anybody have a view on how long it is safe to use a 302 temporary redirect for? i.e., is 8-10 months to long. Thanks, Ben
Intermediate & Advanced SEO | | BenRush0