Remove directory from Google SE results

Remove directory from Google SE results - If a page has internal and external outgoing links to redirecting URLs, it’s returning 3xx (301, 302, etc.) HTTP status codes standing for redirection. This issue means that the page does not exist on a permanent or temporary basis. It appears on most of the popular web browsers, usually caused by a misconfigured website. However, there are some steps you can take to ensure the issue isn’t on your side. You can find more details about redirecting URLs by reading the Google Search Central overview. In this article, we’ll go over how you can fix the Remove directory from Google SE results error on your web browser. Problem :


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 / ?



Update:



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.


Solution :

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.



UPDATE



Try this:



RewriteEngine On
RewriteRule /new/(.*) /$1 [R=301,L]

We hope that this article has helped you resolve the google-search-console, redirects, 404 error in your web browsers. Enjoy browsing the internet uninterrupted!

Comments

Popular posts from this blog

How to redirect to any domain [duplicate]

"302 found" for index page bad for SEO?

Create redirect from url like www.example.us/?p=100&option=