Home > Tutorials > Making Use of HTML > Adding Downloadable Files

Downloads at your Site

Quite often you may want to make downloads available at your site, for example you may want to share a desktop theme or screen saver, or perhaps a midi that you created. Whatever it is, there are a few things you can do to make them available to your visitors.

Zip it Up!

Once you know what you want to make available for download you may discover that it will take up a large chunk of your available web space if you were to simply upload it to your server and hope for the best. One thing you should consider doing is to prepare your files for downloading by compressing them. While it may not seem to make much of a difference, compressing your files using a program like WinZip can have several benefits.

  • It reduces your upload time
  • It reduces your visitors download time
  • The files won't take as much space on your server so you can add even more downloads
  • You can group similar files together in a single file
  • Some servers have a file size limit, compressing them can make it small enough to stay on the server
  • You can distribute files with extensions not usually supported by the server. For example, some servers do not allow you to distribute files with .exe extensions. Providing that you don't need to run these files from the server then you can add them to a zip file. Most servers allow you to use .zip files for downloads

Click to download

Once you've prepared your files for your server and have uploaded them, the only thing left to do is to make them downloadable. Now there are several ways you may choose to do this (depending on how much control you want over the look of the page they use). The easiest and most common way is to make a direct link to the file - you know the good old <a> tag? As with normal links, you can link to downloadable files on your own server, or a remote server (however if you are linking to files on another server, please only link to files that you yourself have uploaded, because you may have to deal with an angry site owner otherwise!)

The only difference between a download and a normal link is the file type that you link to, and sometimes even the protocol that you use. So, if the file that you wanted to share is called download.zip you can make it downloadable with a link similar to the following.

<a href="download.zip">click to download my file</a>

Linking like this will cause your file to be downloaded using the HyperText Transfer Protocol (http), and while this is perfectly adequate for small or infrequent downloads; you may wish to use the more appropriate File Transfer Protocol (ftp) to download your files - if your server supports it. The format for such a link is as follows:

<a href="ftp://ftp.asite.com/user/download.zip">click to download</a>

Play it Safe

Downloads are often the focus of attention for ISPs and web hosts looking for illegal content on their server and so you have to be careful about what downloads you decide to make available from your own site. It has been know for web hosts to delete files and suspend accounts without warning on those they believe are breaking copyright law, even going so far as to delete legitimate MP3s that people have made themselves to promote their own band!

To avoid things like this happening to you, play it safe and make sure that you get written permission from the copyright owners to use their work. It is usually not enough to give them credit, unless you can prove you have the permission to use it, most web hosts will not allow you to continue using copyrighted files and will remove them to protect themselves legally.


Noticed a problem or got a question or comment?


This site will look much better in a browser that supports web standards, but it is still accessible to any browser or Internet device.


About this Page

Author: Rosemarie Wise
Originally Published: Fri 15th Dec, 2000
Last Revised: Fri 7th Dec, 2001
URL: http://websiteowner.info/tutorials/html/downloads.asp

Want to use this tutorial on your own site? Learn more...


The Web Site Owner's Resource © 2000-2007 Rosemarie Wise