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
-
If I have an https page with an http img that redirects to an https img, is it still considered by google to be a mixed content page?
With Google starting to crack down on mixed content I was wondering, if I have an https page with an http img that redirects to an https img, is it still considered by Google to be a mixed content page? e.g. In an old blog article, there are images that weren't updated when the blog migrated to https, but just 301ed to new https images. is it still considered a mixed content page?
Algorithm Updates | | David-Stern0 -
Does Google considers the cached content of a page if it's redirected to new page?
Hi all, If we redirect an old page to some new page, we know that content relevancy between source page and this new page matters at Google. I just wonder if Google is looking at the content relevancy of old page (from cache) and new page too. Thanks
Algorithm Updates | | vtmoz0 -
Redirecting acquired website: DNS or 301?
Hi all, We have taken down some infringing websites and acquired them, so far we made around 40 websites. We are using DNS to land on our website from the acquired. But I've see that recently that DNS is not a redirect and we must 301 redirect from the old site to the new site. Also there is a potential harm in employing DNS method due to the duplicate content that will harm SERP performance severely. Which is the best way? DNS or 301 redirect? Thanks
Algorithm Updates | | vtmoz0 -
Do we need to worry about external redirects?
Hi all, We always avoid internal redirects. Just wonder what if many of the out going links are redirecting to new links. I presume there is nothing wrong to host such links. Any ideas? Thanks
Algorithm Updates | | vtmoz0 -
Link reclamation and many 301 redirect to one URL
We have many incoming links to a non existing pages of a sub-domain, which we are planning to take down or redirect to a sub-directory. But we are not ready to loose pagerank or link juice as many links of this sub-domain are referred from different external links. It's going to be double redirect obviously. What is the best thing we can go to reclaim these links without loss of link juice or PR? Can we redirect all these links to same sub-domain and redirect the same sub-domain to sub-directory? Will this double redirect works? Or Can we redirect all these links to same sub-domain and ask visitors to visit sub-directory, manual redirection? How fair to manually redirect visitors? Any other options? Thanks, Satish
Algorithm Updates | | vtmoz0 -
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 -
How long does it take for a new website to start showing in the SERP'S
I launched my website about 6 weeks ago. It was indexed fairly quickly. But it is not showing up in the Google SERP. I did do the on page SEO and followed the best practise's for my website. I have also been checking webmaster tools and it tells me that there is no errors with my site. I also ran it through the seomoz on page seo analyzer and again no real big issues. According to seomoz I had 1 duplicate content issue with my blog posts, which i corrected. I understand it takes some time, but any ideas of how much time? And f.y.i it's a Canadian website. So it should be a lot easier to rank as well. Could my site be caught in the Google 'sandbox effect' ? Any thoughts on this would be greatly appreciated.
Algorithm Updates | | CurtCarroll0