Mobile app version of vmapp.org
Login or Join
Kimberly868

: What are proper process to disallow a site from google crawl I have done google and get the two solution for disallow whole a site from google crawl. 1: User-agent: * Disallow:

@Kimberly868

Posted in: #Google #RobotsTxt #WebCrawlers

I have done google and get the two solution for disallow whole a site from

google crawl.

1:

User-agent: *
Disallow:


2:

User-agent: *
Disallow: /


Now can anyone tell me which proper code for disallow whole site from Google crawl

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Kimberly868

1 Comments

Sorted by latest first Latest Oldest Best

 

@Alves908

To prevent your whole site from being crawled, then No. 2:

User-agent: *
Disallow: /


This blocks every URL from being crawled. The URL-path following the Disallow: directive is a prefix. If the requested URL starts with this URL-path, it will be blocked. The minimum URL path you can have is / (your home page / document root) - you can't have an empty path (as suggested in comments). When you request example.com, the browser actually requests example.com/ to make the request valid. See my other answer for more information on the trailing slash.

Disallow: by itself (without a path) actually allows everything - the complete opposite!

Reference: www.robotstxt.org/robotstxt.html

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme