Category: Web
Create an .htaccess file with the following contents. This will only work for webhostings which support .htacess files e.g. Apache Web Server
Options +Indexes
deny from all
allow from 1.2.3.4
Replace 1.2.3.4 with your static IP address. One address per line.
Normally, you should have an .htaccess file which has the following options because if you don't have index.html, index.htm or index.php then all of the files will be listed. You don't want that.
Options -Indexes
Related
http://www.clockwatchers.com/htaccess_dir.html