www.nethost.net.nz nethost web hosting


 
 

The public_html and www directories.

When you login to you hosting account for the first time you'll probably notice that the public_html and www directories have the same files in them and it will probably end up confusing you as to which one to use.

The answer? Whichever one you like!

The www directory is not a directory at all, but in reality a symbolic link. It works somewhat like a scifi warp. You click on it and you're warped into the public_html directory. Depending on what you're accessing the files with, it may retain the www name as the directory you're in, or it may show the actually directory you're in (/public_html). Using either one will work the same way and you can even use the www when using paths in scripts if you like something that's shorter.

The important thing to note is that you must place your files and folder within either the www or public_html directory if you want them to be accessible via the internet.