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
-
Log File Analyzer Only Showing Spoofed Bots and No Verified Bots
Question for you guys: After analyzing some crawl data in Search Console in the sitemap section, I noticed that Google consistently isn't indexing about 3/4 of the client sites I work on that all use the same content management system. I began to wonder if maybe Google (and others) have a hard time crawling certain parts of the sites consistently, as finding a pattern here could lead me to investigate whether there's a CMS problem. To research this, I started using a log file analyzer (Screaming Frog's version) for some of those clients. After loading the files, I noticed that none of the crawl activity logged by the servers is considered verified. I input one month's worth of log files, but when I switch the program to show only verified bots, all data disappears. Is it possible for a site not to have any search engines crawling it for a whole month? Given my experience, that seems unlikely, particularly since we've been submitting crawl requests. I know that doesn't guarantee a crawl, but it seems odd that it's never happening for any search engines across the board. Context that might be helpful: I did check technical settings, and the sites are crawlable. The sites do appear in search but seem to be losing organic search traffic. Thanks for any help you can provide!
Algorithm Updates | | geodigitalmarketing0 -
Drop in Organic Traffic for Homepage and Branded terms but Steady in Rankings and According to WMT.
I am stumped. I have been researching for over two days now. Our homepage organic traffic YoY is down approx. 25%. However, rank has not changed according to Conductor, Bing and Google WMT. Impressions have gone up according to both search engines and we rank now for more keywords in top 3 than we did last year. Both WMTs' present a pretty healthy picture. No insignificant indexing issues, Error URLs & blocked resources are down, daily page crawls are higher than ever, etc. I drilled into Google Analytics from a few different view points. The closest I got to an answer was I saw huge out-liars YoY in browsers and browser versions. We saw significant differences in organic traffic YoY from IE 11, 9 ,10, 8 and 7. Android Browser 31, 32 and Safari 6 and 7. I tested our homepage and search results in all of these, and found no issues. Yet, GA reports 50K+ differences YoY. My only thought is it is perhaps a GA attribution error? And/or browsers defaulting organic traffic to direct or other? Yet, our direct traffic is up but does not correlate with as much as we are down. Any tips on where to look next would be extremely helpful!
Algorithm Updates | | lunavista-comm0 -
Does Google ACTUALLY ding you for having long Meta Titles? Or do studies just suggest a lower CTR?
I do SEO in an agency and have many clients. I always get the question, "Will that hurt my SEO?". When it comes to Meta Title and even Meta Description Length, I understand Google will truncate it which may result in a lower CTR, but does it actually hurt your ranking? I see in many cases Google will find keywords within a long meta description and display those and then in other cases it will simply truncate it. Is Google doing whatever they want willy-nilly or is there data behind this? Thank you!
Algorithm Updates | | Bevelwise0 -
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 -
Redirecting Blog WITHOUT .htaccess
Hello Mozzers! I currently have a WordPress blog on a subdomain that I'd like to redirect to a subdirectory. Unfortunately, the CMS that I am on will not allow me implement a rewrite rule because we do not have access to the server (It's on Shopify, which is a fully hosted solution). If we set up a 301 from blog.domain.com to domain.com/blog, will all my link juice be preserved? Or is it better just to keep it on the subdomain for now? I'd like to avoid importing all my content into Shopify's native blog, if I can, just because we may be moving to another CMS shortly. Thank you in advance! -Alima Team
Algorithm Updates | | okatieo0 -
301 Or Canonical, Which one is more effective for eCommerce Website ?
I have my own eCommerce website. I want to avoid duplicate category pages so which method is more useful 301 redirection or Canonical url?
Algorithm Updates | | yuvastyle0 -
Domain Deindexed because of Redirect
I think this is an interesting topic to discuss though I'm looking for answers too. One of my well performing domain deindexed by Google today. Reason: Redirect from a 9 year old Deindexed domain (Must be penalysed) I believe this is done by one of my competitor. What you people suggest me to do now? Don't you think if this is the way Google treat the redirects after Penguin anybody can use this technique to harm their competitors?
Algorithm Updates | | HeIsHere0