WebDevelopersNotes logo

home-icon Home / Hosting / Where do I put the files on my server?

Where do I put the files on my server?

Where do I put the files on my server?

A hosting server runs a program called the web server. It is this program that makes the machine act like a web server, that is, processing requests for web pages. The web server software requires that a directory be designated as the home, root or base. All your web site files need to be placed in this directory. You may have folders inside this root directory, but the homepage has to reside here (typically).

On Linux/Unix/FreeBSD based servers running the Apache web server, the home directory is typically called public_html or www (“www” is actually a shortcut to the “public_html” directory). If you want to place a homepage you should first move to the public_html or www directory and put the page there.

Sponsored Links

The homepage of a web site has a specific file name. It is typically, “index.html” (“index.htm”) OR “default.html” (“default.htm”). However, it all depends on how the server software has been configured. If index.html or default.html do not work for you, first make sure that you have put these files in the document root. If the homepage still doesn’t load, I suggest that you get in touch with the hosting company and ask them to help you out.

Putting server-side scripts

Generally server-side scripts work from any directory or subdirectory of the document root. However, certain web hosting companies might require you to place these in specific directories. The most common example is placing all perl scripts into the cgi-bin directory. Web hosting companies do this to provide enhanced security. You need to check this with your hosting company or upload and test a script.

Web site directory structure

Make sure that the directory structure of your web site on the server is the same as on your local computer. For example, if all images of your web site are placed in an “images” directory (subdirectory of the document root directory), ensure that the same is on the web server, else images will appear as broken links on your web pages.

If you’ve used FrontPage to create the web site, you can easily synchronize you site stored locally with the files on the web server.

Sponsored Links

Your comments
Star icon IMPORTANT Have a question / problem? Click here to ask an expert.

Sponsored Links


How do I view a deleted web page?
Is there a way to view a deleted web page - one that is no longer available? Yes there is and the solution is quite simple. [more...]


The computer's "Copy-n-paste" feature was first implemented in the Gypsy word processor developed at Xerox Palo Alto Research Center in 1970s. [more...]

We use cookies to give you the best possible website experience. By using WebDevelopersNotes.com, you agree to our Privacy Policy