301 redirects
-
Hello,
I want to ditch about 1000 pages of a 2000+ page site. I believe the 301 redirect thing is the way to go but my expertise is limited. Is there a way to do a blanket redirect ie if a user or search engine looks for a page thats not there it all gets redirected to the index page or do I have to do each one manually?
Thanks
Ian
-
ok thanks
-
you can point example.com to any directory you wish...
and they should be on seperate lines, not sure why moz changes that
RewriteEngine on RewriteBase /
RewriteRule ^gallery/(.*) http://www.example.com/ [R=301,L]
-
Hello Andy,
Thanks for that.
I have most of it in a directory so just so I know I've got it right... in the htaccess file I put a line:
RewriteEngine on RewriteBase / RewriteRule ^gallery/(.*) http://www.example.com/ [R=301,L]
Where /gallery is the directory to be moved, will send everything from the directory (including stuff in subdirectories) to the index page? I do have a corresponding new gallery but the file names are different.
Cheers
-
this depends how your site is set up ... for example if you are redirecting a directory (eg .com/blog/) to your root thats easy enough to do - but if they are specific files that don't have within say the root or a folder you are not redirecting in it's entirety it would be manual work I am afraid. - see below
The other option is to drop to 404 page if you are just removing the content and not redirecting to relevant content ... admitting a page is missing and hasn't been replaced is sometimes the best way to show you are working on your site and consolidating info to be valuable to users. Also you can use your 404 page to have a big of fun and explain to users why something has gone missing or changed - or even just have a search box there.
_RewriteEngine on RewriteBase / RewriteRule ^old_dir/(.*) http://www.example.com/new_dir/ [R=301,L]_
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
-
HTTPS & Redirects
Hi We're moving to https imminently & I wondered if anyone has advice on redirects. Obviously we'll be redirecting all http versions to https - but should I be checking how many redirects are in each chain and amending accordingly? If there's 4-5 in a chain, remove the middle unnecessary URLS ? Advice please 🙂
Intermediate & Advanced SEO | | BeckyKey0 -
301 v/s 302 Redirection on Homepage (Multilingual)
Hello, Our website: http://www.luxresorts.com currently has a default 302 redirection to http://www.luxresorts.com/en. We would like to do a 301 redirection instead of a 302 to http://www.luxresorts.com. Our concern is that the site is multilingual and we wonder what effect would the 301 redirection have on search engine crawlers and how would this appear on SERP. When a search is done on Google.com, the English version of our website appears and when on Google.FR, the French version appears. Would the 301 redirection change the way our website appear on Google? Grateful if you could help us out in understanding the pros and cons/best practices for our concern. Thanks in advance. Tej Luchmun.
Intermediate & Advanced SEO | | luxresorts0 -
301 redirect a old site that has been "dead" for a while?
Hi guys, A quick question. I have a client who has an old business website that had some great links (Forbes.com, CocaCola.com, etc). The problem is that he knew nothing about SEO and let the hosting expire. He still owns the domain, but the site is no longer listed in Google. He did no SEO, so I am not worried about being hit by any artificial anchor text penalties, since the links are as natural as it gets. So my questions is, would there be any benefit from 301 redirecting that site to his new business? The new business is in almost exactly the same niche as the old site. I am thinking of 301'ing to a sub-page which will refer to his past venture with the old business, not to the homepage of the new site. Thanks in advance for your help.
Intermediate & Advanced SEO | | rayvensoft0 -
301 redirect on Windows IIS. HELP!
Hi My six-year-old domain has always existed in four forms: http://www**.**mydomain.com/index.html http://mydomain.com/index.html http://mydomain.com/ http://www.mydomain.com My webmaster claims it’s “impossible” to do a 301 redirect from the first three to the fourth. I need simple instructions to guide him. The site’s hosted on Windows running IIS Here’s his rationale: These are all the same page, so they can’t redirect to themselves. Index.html is the default page that loads automatically if you don’t specify a page. If I put a redirect into index.html it would just run an infinite redirect loop. As you can see from the IIS set up, both www.mydomain and mydomain.com point to the same location ( VIEW IMAGE HERE ) _Both of these use index.html as the default document ( VIEW IMAGE 2 HERE ) _
Intermediate & Advanced SEO | | Jeepster0 -
Explaining 301 redirects instead of 302
I am trying to explain in layman's terms to a client why using 302 for their redirects (which they have done themselves) is not right. There view is they do not seem to listen or believe what is being said to them and do not want to do permanent damage to the old domain so are using 302 redirects. I have explained over and over 301 is needed but I do not seem to be good at communicating this. Can someone give me a good example or description I can use to get my point across?
Intermediate & Advanced SEO | | JohnW-UK0 -
New to SEO. How do I set up a 301 Redirect? What Else should I do?
Hello, I am new to web design. I designed my own site using dreamweaver and did all my seo on my own, I read a few books. Long story short I rank on the bottom of page 1 just after 3 months and the keywords are highly competitive. Now, I am up against some heavy hitters from national brands versus my local real estate site. I don't have a 301 redirect, and am not sure what else I should be doing to get my site ranked higher. I have back links from various sites, ( non-paid ) so it's what others call white hat. When I grade my site on website grader I get a great score versus the sites that are higher than me. I'm guessing my sites age is an issue. I guess I'm looking for some guidance. Thank you all, Here is my site to view. http://www.bronxpad.com
Intermediate & Advanced SEO | | bronxpad0 -
Should 301 Redirects be used only in cross domains or also internally?
In the following video with Cutts: http://youtu.be/r1lVPrYoBkA he explains a bit more about 301 redirects but he only talks about cross sites. What about redirecting internally from a non-existing product in a store to a new similar existing product?
Intermediate & Advanced SEO | | BeytzNet0 -
Is it ok to redirect
Hello my question is presently we holding one .com for our website and i see in analytics some time people typing .es version of our site too.. which is not registered yet. is it ok to buy that .es extension and do a redirect to our .com version ? thanks
Intermediate & Advanced SEO | | idreams0