Long term plan for a large htaccess file with 301 redirects
-
We setup a pretty large htaccess file in February for a site that involved over 2,000 lines of 301 redirects from old product url's to new ones.
The 'old urls' still get a lot of traffic from product review sites and other pretty good sites which we can't change.
We are now trying to reduce the page load times and we're ticking all of the boxes apart from the size of the htaccess file which seems to be causing a considerable hang on load times. The file is currently 410kb big!
My question is, what should I do in terms of a long terms strategy and has anyone came across a similar problem?
At the moment I am inclined to now remove the 2,000 lines of individual redirects and put in a 'catch all' whereby anything from the old site will go to the new site homepage.
Example code:
RedirectMatch 301 /acatalog/Manbi_Womens_Ear_Muffs.html /manbi-ear-muffs.html
RedirectMatch 301 /acatalog/Manbi_Wrist_Guards.html /manbi-wrist-guards.htmlThere is no consistency between the old urls and the new ones apart from they all sit in the subfolder /acatalog/
-
When I faced a situation with several hundred pages, I decided to to only list the most important ones. I determined the important ones by there presence in Google and the import of the page content.
I first Googled "site:www.example.com" to get a good idea of what was indexed.
I used Analytics to see if any pages were entry pages. If a page gets no hits as an entry page, the 301 redirect is never needed.
I made a list of about 100 redirects, then made the 404 error page a slight variation of my homepage.
Now if you have any pages that have links in, you will need to maintain those redirects.
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 long does Google indexes the website after algorithm update?
I've noticed that the page ranks for some queries were improved unexpectedly, without any actions from my side. Is it possible that this improvement is connected with with Google algorithm update Sep, 4-5?
Algorithm Updates | | AurigaPR0 -
How long you've seen it take to rank in small niche
Hello, How long do you see small niche sites taking to rank where they should be for their strength? Our last site took at least 6 months. Our current site's home page for our main term is stuck at around the 40th page and not moving. It's an exact match domain so it should be on at least page 2. We have one site in the industry already that carries similar products but it is much bigger with a much wider scope of products. It took a while to rank too. Our only backlinks I'm working on are Google & Youtube (and DMOZ), we have a facebook fan page. Our site is nicer than the site in position #1. Working on making as many pages as possible 10X content. Thank You, Bob
Algorithm Updates | | BobGW0 -
Does anyone know what causes the long meta description snippet?
You know the ones I mean... Google have been infrequently displaying some meta descriptions as 3-4 lines long for some time now. But recently, I've been noticing them more. Not sure whether it's just a coincidence that I've been seeing more for my searches, or whether Google are displaying more in this format. Does anybody know what causes Google to prefer the longer meta description or extended meta description for some results?
Algorithm Updates | | Ria_0 -
Case Sensitive URL Redirects for SEO
We want to use a 301 redirect rule to redirect all pages to a lower case url format. A 301 passes along most of the link juice... most. Will we even see a negative impact in PageRank/SERPS when we redirect every single page on our site?
Algorithm Updates | | tcanders0 -
Long term rankings drop after swapping primary domain
Hey...this is my first post on Moz so please go easy on me! I've recently been baffled by the ranking behavior of a domain I do SEO for. In short, the primary domain was "musashispicymayo.com". After several months of SEO efforts and a really solid PR run the site managed to run up to #1 for several target keywords. For the purposes of this question I'd like to focus on the term "spicy mayo". "Musashispicymayo.com" was steadily climbing for as far back as page 5 until it ultimately reached #1 rank on Google for "spicy mayo". We also had another domain "musashifoods.com" which was originally 301 redirecting to "Musashispicymayo.com". About 3 months ago (shortly after acquiring the top ranking) the client wanted to reverse the domains so we started using "musashifoods.com" as the primary and redirecting "musashispicymayo.com" to that. In summary:
Algorithm Updates | | Andy-Twizen
ORIGINALLY: musashifoods.com 301 redirect -> musashispicymayo.com
NOW: musashispicymayo.com 301 redirect -> musashifoods.com At the time of the swap I did the following: Redirected the domain using a 301 via htaccess (made sure "www" requests are forwarded too) Created a new Google analytics account / webmaster account for "musashifoods.com" Went into my old webmaster tools account and used the change of address tool In the new webmaster tools account i submitted a sitemap and requested a crawl of the new domain Ensured the new primary domain was properly configured and all pages had the correct urls in the source code Verified that Google has updated their index and "musashifoods.com" now shows in the results. Now of course musashispicymayo has the keyword in the domain but I find it hard to believe that that is what caused such a dramatic and swift drop in rankings. In fact a good portion of the backlinks actually point to "musashifoods.com"...Did I miss something else here? Does Google penalize you for reversing 301 redirects like that instead of just using a new domain altogether? Let me know if I can provide any additional info that would help clarify...any advice is greatly appreciated!0 -
Same search term shows #1 on Bing but #140 on Google?
Hi, I am using the search term of my website domain i.e. "Series Digital" on both Bing and Google. Bing shows my website as the top most link. But on Google, my website appears on page 14!! Why is this happening when I am using the string within the " "?
Algorithm Updates | | Cloudguru990 -
301 a purchased domain
I've purchased a competitor. They rank well organically for keywords that I target, and I want to optimize the way I get value from their current rankings and traffic (and customers -- we will obviously market to their email/customer list). Which is better: (1) use a 301 redirect for any access to their domain and point it to my home page. I think this would force Google to de-index all of their pages, right? (2) put up a stub page as their homepage that announces the site has been bought, and have a do-follow link to my home page (which maybe is auto-redirected after 10 seconds or something)? Maybe this is better to keep their home page in Google's index for a while? As for option (1), I thought I read somewhere recently that 301'ing a domain to the home page of another domain would no longer pass link juice (?). Maybe I should 301 the newly purchased domain to a sub-page on my site that explains the acquisition and asks them to sign up on my site? Both sites are legit. No spamming happening here; just industry consolidation as one competitor acquires another. Thanks in advance...!
Algorithm Updates | | scanlin0 -
I used to rank 12 or 13 for a specific search term. Now I don't show up at all. What's cuasing this?
Used to rank on the second page for a specific search query, now we don't seem to show up at all for the same query. Has Google penalized us or is something else going on?
Algorithm Updates | | wlefevre0