Getting Started with Your Web Hosting Service

You've signed up for your new shared Web hosting service. What now? This tutorial helps you understand the various files and folders in your Web space, and shows you how to upload your first Web page.

You've done your research, you've picked a good hosting plan, and you've signed up. What's the next step? You'll need to orient yourself to the contents of your Web space, and learn how to upload Web pages. This tutorial shows you how.

Features of shared Web hosting

Usually, when you join a shared Web hosting plan, the hosting company gives you a number of facilities, such as a Web-based control panel for managing your site, some usage statistics, and email accounts. Nearly all Web hosting plans include at least the following:

  • Some Web space. This is an area of the Web server's hard drive that stores your website's files, such as Web pages and images. Upload your Web pages here, and they then become viewable on the Web. Usually you're given between 10 megabytes (MB) and a few hundred MB of Web space.
  • FTP access. This allows you to use an FTP program to upload your website's files to the Web space.

Logging in via FTP

The first thing you'll probably want to do with your new hosting plan is connect to the Web server via FTP and upload your website. (If you need help with understanding and using FTP, take a look at our articles on FTP.) Once you've logged in via FTP, you'll see a listing of files and folders. This is your home directory; it's an area of the Web server where you can upload, download and delete files and folders.

Let's take a look at the various files and folders you can expect to see in your home directory. You'll then learn how to upload your website.

Understanding the contents of your home directory

The home directory usually contains a few files and/or folders. The exact contents depend on your hosting plan, but here we'll explain the most common folders and files that you'll find in your home directory.

htdocs, html, public_html, or mainwebsite_html
You'll usually find a folder with one of these names in your home directory. It's called the document root, Web root or website directory, and it's the folder that corresponds to the top level of your website. For example, if you place a file called mypage.html in this folder, and your website's URL is www.example.com, you can view that file on the Web using the URL www.example.com/mypage.html.
cgi-bin, cgi, or mainwebsite_cgi
This folder, if it exists, is usually either in your home directory, or inside the document root folder. It's where you upload any CGI scripts that you want to use on your website. CGI scripts are usually written in Perl. For more info, see our articles on Perl and CGI scripting.
perl or mainwebsite_perl
This folder is for uploading Perl scripts designed to run under mod_perl, the Apache Web server's Perl extension. mod_perl scripts generally run a lot faster than CGI Perl scripts, and can integrate more closely with the Web server. If your Perl scripts are not mod_perl compatible — many aren't — then upload them to the cgi-bin, cgi, or mainwebsite_cgi folder instead.
images
You'll often find an images folder inside your document root folder. It's a good idea to upload all your images to this folder (or to subfolders inside the images folder) so that all your images are in one place. If the folder doesn't already exist, you can easily create it with your FTP program. (You might also want to create a css folder to contain your style sheets, a js folder for your JavaScript code, and so on.)
logs
Your home directory may well contain a logs folder. This folder contains the raw log files generated by the Web server; every time a visitor's browser requests a Web page, image, or other URL from your website, the server writes a line to the current log file. Log files can get very big on a busy site, and they're not that useful in their own right, which is why Web hosting companies often provide some sort of human-readable stats (see below).
stats
Many Web hosting packages come with usage statistics. These show you how many people visit your site each day, which pages they visit, and so on. Usually they're created by processing the raw server log files (see above). Often the statistics are stored in a stats folder inside your document root. You can then browse the stats via a URL such as www.example.com/stats/.
index.html, index.htm, or Default.htm
When you first login to your Web server via FTP, you'll usually find a file with one of these names inside your document root folder. This is the holding page that appears when you view your new site via a browser; usually the page says something like, "website under construction". When you upload your website, you'll want to replace this file with your own index.html, index.htm, or Default.htm homepage. Pages with these special filenames are known as index pages; if a visitor browses a folder, such as www.example.com/myfolder/, the Web server looks for one of these index pages inside that folder and, if it exists, it displays that page to the visitor.
_vti_bin, _vti_cnf, _vti_log, _vti_pvt, and _vti_txt
The presence of these folders in your document root indicates that your server is running FrontPage Server Extensions, a Microsoft technology that allows the FrontPage Web authoring software to store information on your server. If you use FrontPage, leave these folders alone. If you don't use FrontPage, and you find the folders annoying, ask your hosting company if they can turn off the extensions for your site.
500 GB of hosting for only $4.95/mo.

Uploading your first Web page

Now that you understand the structure of the files and folders in your home directory, you're ready to start uploading your website. In this section we'll walk you through uploading your first Web page.

You can learn how to put together a basic Web page in our basic HTML tutorial.

Let's assume that you want to upload a new home page for your website. This means that you want to replace the default index page in your document root folder (index.html, index.htm, or Default.htm).

Don't worry if there's no existing default index page in your document root folder. Sometimes, Web hosting companies just give you an empty folder by default.

To upload your home page, follow these steps:

  1. Make sure your home page is called index.html. If it isn't, rename it using your file manager (for example, Windows Explorer on Windows, or the Finder on Mac OS).
  2. Open your FTP program and use it to connect to your site. See our FTP articles for more info on this.
  3. Find your document root folder. This is probably called htdocs, html, public_html, or mainwebsite_html, although your document root may be the same as your home folder. See the "Understanding the contents of your home directory" section above for more info. Once you've found the folder in your FTP program, open it (you can usually do this by double-clicking it).
  4. Upload the home page. Find your index.html home page file on your hard disk using your FTP program, then upload it to the document root folder on your Web server. You can usually do this by dragging the file in your FTP program, or by selecting the file and clicking an Upload button. If there was already a default index page called index.html in the document root folder, you'll probably need to confirm that you want to overwrite it.
  5. Test the page. Open up your Web browser and go to the URL of your website. You should see your newly-uploaded home page appear. If you still see a default holding page, make sure there are no other Web pages in your document root that might be overriding your index.html page (for example, index.htm, index.php or Default.htm). If you do find other files with these names, rename or delete them using your FTP program.

Next steps

Congratulations! You now know:

  • How your Web space on your server is organized
  • How to upload a new home page to your Web site

Next, you'll probably want to upload more Web pages, as well as images. To do this, just use your FTP program to upload the files, as described above. If you're having trouble with images not appearing when they're uploaded, you might also find our HTML Images tutorial helpful. Good luck — and if you need any extra help, feel free to ask in our Forums!

Follow Elated

Related articles

Responses to this article

There are no responses yet.

Post a response

Want to add a comment, or ask a question about this article? Post a response.

To post responses you need to be a member. Not a member yet? Signing up is free, easy and only takes a minute. Sign up now.

Top of Page