I think the best way to describe this is to have it in the root folder of your domain ... so http://example.com/robots.txt you can also put your sitemap.xml file in the root directory or link to it using Sitemap: http://example.com/fldr/smap.xml in your robots.txt file.
don't forget: you can use Google’s Webmaster Tools to make sure you don’t restrict anything you didn’t want (you can also see woohoo requests and links!).
: id consider using <META NAME="ROBOTS" CONTENT="INDEX, NOFOLLOW"> if possible, because you will still earn linkjuice for links on the page, but it won’t appear in the googles index at that time as a robots.txt directive can leave a simple url with a do description in SERP, but lose all the link to it because its robots.txted out (its b / c rating of anchor text to get credit for it)
source share