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

General Discussion

How to Hide a Site during Development

How to I hide my website from being discoverable while I develop it? Thanks.

5 Answers

put this in a .htaccess file:

 order deny,allow
 deny from all
 allow from

If your website is not on your localhost change 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: /

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

Create a .htaccess file and put the code in. I'm assuming you are using Apache as a web server.

You 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.

No. I don't think so. I'm just using a basic Web Hosting for Students account recommended by treehouse.

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

oh 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?

upload it to the root folder of your website (where your site's index.html or index.php is).

Thanks I will give it a shot. should be fairly simple. I appreciate your help