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
-
To avoid the duplicate content issue I have created new urls for that specific site I am posting to and redirecting that url to the original on my site. Is this the right way to do it?
I am trying to avoid the duplicate content issue by creating new urls and redirecting them to the original url. Is this the proper way of going about it?
On-Page Optimization | | yagobi210 -
301, Canonical, and Page Authority
I have been trying to find an answer to this question for awhile now but I am having trouble. I have a clients site that I need to redirect and Canonical the pages to correct duplicate content issues and title tags however, the issue with this client is that some of the www. pages have a higher PA than non-www and the reverse is true. I am wondering if there is an issue with chasing the PA to get the highest PA per page (even if this means the site is going to be a mix of www. and non-www. pages)? I am extremely new to SEO so I apologize ahead of time if I missed this in the forum.
On-Page Optimization | | Highline_Ideas0 -
Redirection
Hi all I have these domains active:
On-Page Optimization | | juanmiguelcr
www.piensapiensa.es
http://piensapiensa.es which redirects to www.piensapiensa.es via webmastertools
http://piensapiensa.com
www.piensapiensa.com which redirects to http://piensapiensa.com via webmastertools.
I want the last three items to redirect to www.piensapiensa.es Here is part of the code of the htaccess file that I have until now:
Options +FollowSymLinks +ExecCGI
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.piensapiensa.es [NC]
RewriteRule (.*) http://www.piensapiensa.es/$1 [R=301,L] Thanks in advanced.0 -
Reverse 301 redirect - how will that work?
Hi We have done some testing where we have changed our URL to a new name and 301 redirected the old to the new. It has now been decided to go back to the old url again but is there an seo risk to this? Will all the inbound links that as redirected in the first change be lost or?
On-Page Optimization | | AndersDK0 -
Meta Title for large Metro Area landing page
Hello! I am creating "metro landing pages" for an organization that has a 10-18 locations per metro city. The landing page houses brief information about the organization as a whole and then it has the locations listed with links to their respective pages. My question is how to optimize these titles. My sample city is Atlanta, GA. This metro page includes 18 locations from the Atlanta area. Marietta, Sandy Springs, Decatur, etc... My question is what is the best Meta Title to use for a Metro Page like this? Would it be best to say Day Care in Metro Atlanta | ABC Childcare Company | Child Care Atlanta Area or is their a better way to optimize a large Metro landing page? I really appreciate any suggestions! Thanks!!!
On-Page Optimization | | TracSoft0 -
Hi . I have a question regarding a surge in 302 temporary direct errors following reactivation of my site reviews.
Hi. i submitted the following question to the support team at volusion regarding a large number of 302 temporary redirects on the SEOMOZ crawl of following the reactivation of product reviews on my website. Here is the question and their response. Any opinions. Thanks TRANSCRIPT: Hi Howard, Looking at the link you have referenced, this page is unable to be accessed unless you are logged into your site, so SEO isn't applicable for the page. We would not be able to change the 302 redirect for this page. Please don't hesitate to contact us if you have any further questions. Thanks,
On-Page Optimization | | mrkingsley
Meredith G.
Here for you 24x7x365 Volusion Support Check out our online support: http://support.volusion.com | 4 days ago (102hrs ago) [8/19/2012 10:06:00 AM] by Customer | | Hi . I had a report of 302 temporary redirects when SEO moz did a simulated site crawl. This is an example of the address of one of the many 302 temporary redirect errors which I think consume link juice or have some type of negative effect on SEO. http://www.mrgrabbar.com/reviewhelpful.asp?ProductCode=GT100&ID=562&yes=yes Since it is a live link I cannot seem to redirect it with a 301 redirect in the redirect manager. Is there anything I can do to handle these temporary redirects. They only are appearing now since I reactivated my reviews and I am concerned about the SEO effect that this may soon have.0 -
301 redirects from several sub-pages to one sub-page
Hi! I have 14 sub-pages i deleted earlier today. But ofcourse Google can still find them, and gives everyone that gives them a go a 404 error. I have come to the understading that this wil hurt the rest of my site, at least as long as Google have them indexed. These sub-pages lies in 3 different folders, and i want to redirect them to a sub-page in a folder number 4. I have already an htaccess file, but i just simply cant get it to work! It is the same file as i use for redirecting trafic from mydomain.no to www.mydomain.no, and i have tried every kind of variation i can think of with the sub-pages. Has anyone perhaps had the same problem before, or for any other reason has the solution, and can help me with how to compose the htaccess file? 🙂 You have to excuse me if i'm using the wrong terms, missing something i should have seen under water while wearing a blindfold, or i am misspelling anything. I am neither very experienced with anything surrounding seo or anything else that has with internet to do, nor am i from an englishspeaking country. Hope someone here can light up my path 🙂 Thats at least something you can say in norwegian...
On-Page Optimization | | MarieA1 -
Duplicate Title question
Thanks Mozzers in advance for any insight into what I'm sure is a basic SEO question. I'm working with a resort in the great state of Maine. Their home page title reads Maine Resorts, Resorts in Maine, (company name). The site has about 400 URL's and over half of the URL's utilize the first keyword phrase of the home page title, "Maine Resorts." Predominately, I find them used on the Accommodations pages (pages that describe each room with a picture) which I would label as deeper pages and non-conversion type pages. The page titles themselves are not exact duplicates of the Home Page Title but might read something like "Maine Resorts, Company Name, Accommodation Listing." My concern is that the heavy use of "Maine Resorts" as the first phrase in over 200 plus pages might be competing against the home page and pulling the home page ranking down. Thanks for any help given!
On-Page Optimization | | hawkvt10