Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial

Cecil Quist
2,851 PointsHow to Hide a Site during Development
How to I hide my website from being discoverable while I develop it? Thanks.
5 Answers

stoyantodorov
7,666 Pointsput this in a .htaccess file:
order deny,allow
deny from all
allow from 127.0.0.1
If your website is not on your localhost change 127.0.0.1 to your real IP. This will allow only you to access it.
If you are only concerned about search engines discovering your website, you can suffice with putting the following code in robots.txt:
User-agent: *
Disallow: /

Cecil Quist
2,851 PointsThanks Stoyan, I don't think i have a .thaccess file. it's just a simple site; how do I do add that? thanks.

stoyantodorov
7,666 PointsCreate a .htaccess file and put the code in. I'm assuming you are using Apache as a web server.

stoyantodorov
7,666 PointsYou can just open your code editor, paste the code in, and save the file naming it ".htaccess" (without the quotes). Then put it into your site's folder.

Cecil Quist
2,851 PointsNo. I don't think so. I'm just using a basic Web Hosting for Students account recommended by treehouse.

stoyantodorov
7,666 PointsThe hosting company is using Apache, so it will work. :) Just create the .htaccess file, change 127.0.0.1 in the code to your external IP, and finally upload the file on your website.

Cecil Quist
2,851 Pointsoh I see just like saving the with html or css extension. any particular place, folder or hierarchy i should be placing it, or just upload it anywhere?

stoyantodorov
7,666 Pointsupload it to the root folder of your website (where your site's index.html or index.php is).

Cecil Quist
2,851 PointsThanks I will give it a shot. should be fairly simple. I appreciate your help