Zabs
Zabs

Reputation: 14142

Remove page from Google Listings using robots.txt file

Is this the correct way to do this - below is my txt file, would this prevent Google from indexing my admin directory as well as oldpage.php?

User-agent: *
Allow: /
Disallow: /admin/
Disallow: http://www.mysite.com/oldpage.php

Upvotes: 3

Views: 1222

Answers (1)

Nimit Dudani
Nimit Dudani

Reputation: 4860

Yes you are absolutely correct except single file restriction.

User-agent: * : means for all crawler

Allow: / : allow access of full site

Disallow: /admin/ : restrict to admin directory

Disallow: /oldpage.php : restrict to oldpage.php

Upvotes: 7

Related Questions