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
-
Redirect Juice?
Hello all! I have a partner site that is linking their product page (step 1) to our product page (step 2) and then we instantly forward them to our shopping cart page (step 3) with that product added. Will my product page (step 2) get the SEO juice from our partners link (step 1) even though we instantly forward to our shopping cart page (step 3)? Curious about ways to technically do this correctly. Thank you!
Intermediate & Advanced SEO | | Jamesmcd030 -
Have You 301 Redirected Domain A to Domain B ?
I only have two questions.... Approximately when did you do it (year is close enough)? Did the rankings of Domain B go up? Any other information that you care to share will be appreciated. Thank you!
Intermediate & Advanced SEO | | EGOL0 -
Multiple 301 redirects for a HTTPS URL. Good or bad?
I'm working on an ecommerce website that has a few snags and issues with it's coding. They're using https, and when you access the website through domain.com, theres a 301 redirect to http://www.domain.com and then this, in turn, redirected to https://www.domain.com. Would this have a deterimental effect or is that considered the best way to do it. Have the website redirect to http and then all http access is redirected to the https URL? Thanks
Intermediate & Advanced SEO | | jasondexter0 -
Redirection question
How would I redirect this URL: http://www.members.mysite.com/ to this URL: http://www.mysite.com/ ? I cant figure it out
Intermediate & Advanced SEO | | JohnPeters0 -
How important is having a 301 redirect?
Is having a 301 redirect a must for rankings when it comes to the www and non-www version of a site? I am on the bottom of page 1 for my main key phrases but I can't do a 301 redirect with my web host that I've been with for over a year. I've been considering changing web host (currently with Yahoo) but I also have concerns about transferring the site and the impact it might have because of the changing ip address. So my options are Stay Put Change Web host Which would you recommend?
Intermediate & Advanced SEO | | bronxpad0 -
Duplicate Title Tags & Duplication Meta Description after 301 Redirect
Today, I was checking my Google webmaster tools and found 16,000 duplicate title tags and duplicate meta description. I have investigate for this issue and come to know about as follow. I have changed URL structure for 11,000 product pages on 3rd July, 2012 and set up 301 redirect from old product pages to new product pages. Google have started to crawl my new product pages but, De-Indexing of old URLs are quite slower. That's why I found this issue on Google webmaster tools. Can anyone suggest me, How can I increase ratio of De-Indexing for old URLs? OR any other suggestions? How much time Google will take to De-Index old URLs from web search?
Intermediate & Advanced SEO | | CommercePundit0 -
Canonical / 301 Redundancy
Suppose I have two dynamic URLs that lead to the identical page: www.example.com/product.php?x=1&y=1 and www.example.com/product.php?y=1 The x=1 parameter had some historical meaning, but is now unused. All references to the x=1 parameter have been removed from internal links and sitemaps. I have implemented two solutions: First, the header of www.example.com/product.php?x=1&y=1 includes: Second, the .htaccess file includes the following: Redirect permanent /product.php?x=1&y=1 http://www.example.com/product.php?y=1 Questions: 1. I assume that since canonical is still relatively new, it's best to play it safe and implement both solutions. Is this correct? 2. When I point my browser to www.example.com/product.php?x=1&y=1, it does NOT redirect to www.example.com/product.php?y=1. The address bar continues to show the non-canonical URL. Is this because the canonical tag somehow takes precedence over the 301 redirect? 3. How long will Google Webmaster Tools continue to show these as duplicates, even though I've implemeted BOTH canonical and 301? It's been a few weeks and I thought it would have rolled off by now. Thanks!
Intermediate & Advanced SEO | | ahirai0 -
Redirects/Forwarding
I have two niche e-commerce sites. One is a PR3 with 3K pages indexed, the other is PR0 with 5K pages indexed. Each site has a blog that has been updated regularly. They both rank well for some fairly competitive keywords and some good links pointing to them. I also have a main site that is PR3. I am thinking of closing down the sites because they are not generating enough revenue, here are my questions: What is the best way to get the most SEO value from these sites? Do I just do a redirect to the main site? Should I keep the sites and use canonical URLs to the main site? Should I keep the domain as a wordpress blog and point links to the main site? What should I do with the blogs? They are on sub-domains, neither has pagerank. Thanks
Intermediate & Advanced SEO | | inhouseseo0