Mobile app version of vmapp.org
Login or Join
Shelton105

: Preventing appearance of certain directories/pages in google search results I have my personal homepage, and I want the main page itself to appear in search results. But I do not want a certain

@Shelton105

Posted in: #SearchEngines

I have my personal homepage, and I want the main page itself to appear in search results. But I do not want a certain directory and its subdirectories to appear in google search results. How do I do this?

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Shelton105

3 Comments

Sorted by latest first Latest Oldest Best

 

@RJPawlick198

Use a robots.txt file in your main folder and set it to:

User-agent: *
Allow: /


In the folder you don't want anyone to access put a robots.txt file with this body:

User-agent: *
Disallow: /


Checkout www.robotstxt.org/ for more info about robot.txt files.

10% popularity Vote Up Vote Down


 

@Dunderdale272

disallow the search bots to enter these locations:
www.robotstxt.org/robotstxt.html
google describes the procedure pretty good, example given:

User-agent: *
Disallow: /folder1/


This disallows all bots to index the content of "/folder1/"

10% popularity Vote Up Vote Down


 

@Mendez628

There are several mechanisms you can use to do this.

The first is the robots.txt file. This is a protocol which is voluntarily followed by "good" search engines by google, and allows you to list sections of your site which they will not follow.


User-agent: *
Disallow: /myfolder/


The next is meta tags. Individual pages can be tagged with metadata which tells robots not to index or display them. Google has a nice writeup on how to implement these.


<meta name="robots" content="noindex,nofollow">


The final mechanism, if the pages have already been indexed, is to use the search engine's removal mechanism if one exists. I've linked to the documentation for Google, Bing, and Yahoo's removal mechanisms here:


Google URL removal
Bing URL removal
Yahoo URL removal

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme