301 Redirects - Large .htaccess file question
-
We are moving about 5000 pages from root into different folders. We need to individually 301 each page because the are sitting at root level now:
We want to move them to: mysite.com/folder/page.html etc
I dont think redirect match can works because of the different files names and folders they are being moved in to.
Will 5000 entries in .htacess slow site loading? Any other suggestions how to handle?
-
@leadforms
Try this format via your .htaccess# Enable Rewrite Engine RewriteEngine On RewriteBase / # Individual 301 Redirects Redirect 301 /page1.html /folder1/page1.html Redirect 301 /page2.html /folder2/page2.html Redirect 301 /page3.html /folder3/page3.html # ... (and so on for the other 4997 pages) # If there are other specific redirects unrelated to the pages being moved, you can add them here as well.
I hope it helps you.
-
Sorry I meant to add some links that might be useful.
here they are
https://moz.com/community/q/will-301-redirects-slow-page-speed
https://moz.com/blog/heres-how-to-keep-301-redirects-from-ruining-your-seo
https://moz.com/community/q/massive-301-permanant-redirects This is an older question on here but may have some useful insights.
https://webmasters.stackexchange.com/questions/113246/does-too-many-301-redirects-harm-serp-rankings
http://www.thesempost.com/best-practices-for-301s-in-large-htaccess-file/
-
Hi Leadforms,
Interesting question.
Having lots of redirects will slow down your site.
There are different ways to implement your redirects other than .htaccess but I believe this would be the best method for you.
Is there any way you can group some of the redirects? maybe part of the URL is the same for all the pages you want to send to a certain folder then the match may work?
If not then I think you have a massive job on to redirect 5k pages and manage the redirects afterwards as well.
I would look at the pages and judge the value of a redirect on that page. If the page has no external links pointing to it and it has a low PA then do you need to redirect it?
You also need to keep in mind a few other things:
1. You need to make sure that the page you are redirecting to and from are similar in a boolean context - that is that a machine will see them as the same content and not just a person
2. you need to avoid redirect chains - that is a redirect to a redirect and so on
3. If you have redirects in place at the moment from HTTP to https you need to redirect these separately otherwise you will generate a chain
4. I would amend all your internal links rather than relying on the redirect otherwise again you will create a chain
Once you have implemented the redirects you will need to monitor them to see how much traffic they are generating, if after a few months a redirect is generating no traffic and all the traffic is going to the new URL then you will need to consider the benefit of keeping that redirect in place or removing it to improve site load times.
I hope this helps,
Steve
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
-
Is it a good practice to reduce number of redirections (301) after a period of time?
Is it good to use disavow tool and get rid of old URLs i.e. links for pages and posts which we have deleted from our website and added 301 on them?
On-Page Optimization | | Ravi_Rana0 -
To redirect or not to redirect...That is the question
We have old product data that is being updated (approx 30k sku's). Most of the old pages have been indexed and drive the majority of our online sales. But, the updated products have different titles, H1's, etc and have been re-formatted for the better in terms of usability. So, should we redirect thousands of pages to the new pages? Will Google be ok with that?...or should we reformat the current url's with the new data? And, if we reformat current url's with new data...the fear is that the on-page elements that the pages are being pick up for will get wiped out, (be it the H1 in some cases or the title or alt tag for another, etc) because it's simply too much to retain them during the import. Please share
On-Page Optimization | | nisvision0 -
Are internal and external footers on all pages of a large website detrimental to seo?
Hi, I am doing an seo clean up of our site - we have about 12 footers on the bottom of each page plus an internal site map including core keywords. Most footers go to internal sites and some go to external sites which are replicated on those external sites linking back to ours. (these sites are part of the same large company but are not related in any way) Are these bad from an seo ranking perspective? Do the look like spam? We get considerable traffic from one of the external footers that is replicated on their site so need to weigh up what the best option is whether to keep the traffic or to loose it as part of the seo clean up. thanks
On-Page Optimization | | Pday0 -
Massive 301 Permanant Redirects
Hello, First thing first, I am not moving my website to new domain neither changing my hosting. I just want to change internal page URLs to make them user and search engine friendly, URLs of categories and URLs of category filers. What I am talking about is massive 301 redirection. There are some pages which have backlinks and I have no doubt about using 301-permanant redirection for those pages. But as far as the category filter pages are concerned there are no backlinks for those pages, but yes they do have some authority. My website is 2months old. Now I want to know that Does massive redirection effects the website authority? Or avoid using permanent redirection for all pages instead use only for those pages which have back-links and avoid using for category filter pages. http://www.artorca.com/
On-Page Optimization | | MozAddict0 -
Questions About My Report
Hi, I have a website that aggregates NFL analysis (not news). I write 3-5 line summaries about each article I link, so there is a pretty good amount of daily content. Here's the site: http://www.profootballhotreads.com/ After I received my initial report, there were several issues, and I just wanted to get some thoughts on them. Some of these might be related to the aggregate nature, some might be not a concern, but I want to know which ones I should really worry about. Too many links. My main page is a continuously running scroll of links, so obviously this is going to be tough to accommodate. I know this makes each link less "valuable," but does it actually affect my site in any way? I don't really have links to my site on the page other than in the menu, which I assume would be scrolled first. meta description on tag pages. For site design reasons, I have several "pages" that are actually tag collection pages rather than unique pages. For example, each team's page is simply a collection of anything tagged with that team. So, I don't know if I can provide a meta description for those pages without making that the default meta description for any post with that tag. I supposedly have tons of duplicate pages but when I go to those pages, I don't see it. Webmasters said I only had one duplicate. Not sure what's going on. I'm thinking anytime I update a post, it is reading it as two different posts even though only one post exists at a time on the site. I have tons of duplicate page titles. Basically, I have tons of pages on my main page because after a certain amount of posts, it goes to a "new" page, even though it's just a continuation. So, I have Main page 1, Main Page 2, etc with the same title and meta descriptions. I don't think this is a concern, is it? Thanks for anyone who might be able to help. Let me know if there are more questions. Jason
On-Page Optimization | | JMay0 -
I have a question about on page links or duplicate contant
Ok help me out here friends. I’m working with the warnings and errors for my site. I have two problems that relate to each other and I want to know if you had to choose what problem what would you choose. I’m running into some duplicate content and title errors because under categories for my products there are so many products that it creates more than one page and with each new page it has the same title or same content on the page. I tried to make this less in some cases by showing more products per page like 100 items and in most cases per category it will only show one page now. Now some times there’s still more than one page and also this creates too many links now on that category page. So I think I can get rid of all the to many on page links but it will make more pages and duplicate content and title tag. What would you guys do?
On-Page Optimization | | Dataken0 -
Use 301 redirects when deleting old products?
I'm removing old products (wines) from my site, and I've been using 301 redirects for each product page back to the winery page. My question is, am I using best practice? I want people who search for these now nonexistent products to go to the winery page where they will see what is now available. But does google approve? I've also tried leaving the product's page intact but saying that it is no longer available and putting a link in the text that points to the winery page. Which is better, in the eyes of the god google? Thanks!
On-Page Optimization | | JeanYates0