Reputation: 14142
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
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