I was developing a Joomla site in /new/ which was to replace the Mambo site in the root directory. I thought I put a robots file there to stop bots from crawling the new site, but this is not the case.

The new site has since been moved into the root directory, and the old site has temporarily been moved into /old/

How do I remove all mention of pages under /new/ from Google's index? I know Google Webmaster Tools allows you to remove individual pages, but I don't know if this applies to individual directories also.

Is it quicker to place an .htaccess file in this folder with a catchall 301 redirect to / ?


I've added individual 301 redirect entries to .htaccess to redirect the old site's pages to the new site's pages, but the old URLs still generate 404 errors. Any ideas why? The format I used was:

Redirect 301 http://www.site.com/old.htm http://www.site.com/new.htm 

I added these at the end of the .htaccess file.

1 Answer 1


Definitely do a 301 redirect from the old URLs (those in the /new/ directory) to the new URLs (those in the / directory). This will:

  • Tell Google those pages have moved and to update their index
  • Help anyone who finds the old URLs in the search results to find the new URLs (they will be automatically redirected to the URL)

This process will be seamless, too, which is nice. And a simple rule in an .htaccess file should take care of it.


Try this:

RewriteEngine On
RewriteRule /new/(.*) /$1 [R=301,L]
  • Thanks @John Conde. I added the following to the .htaccess in the root directory: RedirectMatch 301 /new/(.*) / However, it redirects to the same URL, just 1 level up.
    – Steve
    Apr 6, 2011 at 15:37
  • Also, RedirectMatch 301 /new/(.*) /index.php does the same thing.
    – Steve
    Apr 6, 2011 at 15:39
  • @John Conde. For some reason the new change is still generating a 500 internal server error.
    – Steve
    Apr 7, 2011 at 1:10
  • I also tried prepending the entire base URL before /new/ but the same error occurred.
    – Steve
    Apr 7, 2011 at 1:13
  • @Steve, I made a minor change. Let me know if that works.
    – John Conde
    Apr 7, 2011 at 1:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.