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
-
Will this 301 redirects help me?
Hello, recently, I found out about all the SEO advantages from 301 redirects. I had 3 websites that are now expired, their topic was Counter Strike 1.6 servers. All of these websites were registered 9 years ago and have few good backlinks (from website with 1%-3% spam score and DA 30+). Now I have one website that is not only about Counter Strike 1.6 but also many other Steam shooter games. If I revive these 3 old domains and 301 redirect them to my new one, will it help me with SEO and increase my ranking on Google?
Intermediate & Advanced SEO | | Bonito19930 -
301 Redirects for Multiple Language Sites in htaccess File
Hi everyone, I have a site on a subdomain that has multiple languages set up at the domain level: https://mysite.site.com, https://mysite.site.fr , https://mysite.site.es , https://mysite.site.de , etc. We are migrating to a new subdomain and I am trying to create 301 redirects within the htaccess file, but I am a bit lost on how to do this as it seems you have to go from a relative url to an absolute - which would be fine if I was only doing this for the english site, but I'm not. It doesn't seem like I can go from absolute url to an absolute url - but I could be wrong. I am new to editing the htaccess file - so I could definitely use some advice here. Thanks.
Intermediate & Advanced SEO | | amberprata0 -
Will 301 Redirects Slow Page Speed?
We have a lot of subdomains that we are switching to subfolders and need to 301 redirect all the pages from those subdomains to the new URL. We have over 1000 that need to be implemented. So, will 301 redirects slow the page speed regardless of which URL the user comes through? Or, as the old urls are dropped from Google's index and bypassed as the new URLs take over in the SERPs, will those redirects then have no effect on page speed? Trying to find a clear answer to this and have yet to find a good answer
Intermediate & Advanced SEO | | MJTrevens0 -
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 -
Urgent Site Migration Help: 301 redirect from legacy to new if legacy pages are NOT indexed but have links and domain/page authority of 50+?
Sorry for the long title, but that's the whole question. Notes: New site is on same domain but URLs will change because URL structure was horrible Old site has awful SEO. Like real bad. Canonical tags point to dev. subdomain (which is still accessible and has robots.txt, so the end result is old site IS NOT INDEXED by Google) Old site has links and domain/page authority north of 50. I suspect some shady links but there have to be good links as well My guess is that since that are likely incoming links that are legitimate, I should still attempt to use 301s to the versions of the pages on the new site (note: the content on the new site will be different, but in general it'll be about the same thing as the old page, just much improved and more relevant). So yeah, I guess that's it. Even thought the old site's pages are not indexed, if the new site is set up properly, the 301s won't pass along the 'non-indexed' status, correct? Thanks in advance for any quick answers!
Intermediate & Advanced SEO | | JDMcNamara0 -
301 a PDF?
Hi Website A is moving to Website B. Website A has a number of PDFs - obviously I cant do a '301 redirect' on them. Any suggestions what to do with the PDFs? Many thanks in advance Nigel
Intermediate & Advanced SEO | | Richard5550 -
How important is having a 301 redirect?
Is having a 301 redirect a must for rankings when it comes to the www and non-www version of a site? I am on the bottom of page 1 for my main key phrases but I can't do a 301 redirect with my web host that I've been with for over a year. I've been considering changing web host (currently with Yahoo) but I also have concerns about transferring the site and the impact it might have because of the changing ip address. So my options are Stay Put Change Web host Which would you recommend?
Intermediate & Advanced SEO | | bronxpad0 -
302 redirect
Aloha, I do a small study of 302 redirects. I wonder if you have any examples of sites where the use of a 302 is made.
Intermediate & Advanced SEO | | android_lyon
For example, to ski resorts: where there is a summer version and a winter version. In this case, the field of 302 will return the version of the relevant season. ex: http://www.valmorel.com/ >> 302 >> http://www.valmorel.com/fr/hiver/accueil-hiver.html I wonder if the use of 302 is the right solution.
What do you think? D.0