What's the difference between allow and disallow directives?
Allow: permits crawlers to access specific pages or directories. Disallow: prevents crawlers from accessing pages. Use disallow for sensitive pages, duplicate content, or crawl-heavy areas. Use allow to override disallow rules.
How do I tell Google bots not to crawl certain pages?
Add "Disallow: /directory/" to robots.txt for that path. For individual pages, use "meta robots nofollow" in the HTML head. Disallow is faster for entire sections; meta tags are better for specific sensitive pages.
Where should I upload the robots.txt file on my server?
Upload robots.txt to your website root directory so it's accessible at yourdomain.com/robots.txt. All search engines check this location first. Ensure file permissions allow public read access.
Can robots.txt prevent indexing of sensitive pages?
Disallow blocks crawling but not indexing if pages are linked externally. For true prevention, combine robots.txt with "noindex" meta tags. For maximum security with sensitive data, don't link the pages at all.