Mastering the Web
Click here
Contents
Website Planning Tutorial
Website Design Tutorial
HTML Tutorial
HTML Tables Tutorial
CGI Tutorial
JavaScript Tutorial
Perl Tutorials
CSS Tutorial
Installing a Web Server
Security Tutorial
HTML Cookies Tutorial
Web Tracking Tutorial
Download Free Programs
F.A.Q.

What do I need to know?

If you are beginning to work as a webmaster or you are just thinking about it, it will help you to know some fundamental concepts which I enumerate in this article.

To publish a Web site requires knowing about several subjects. These subjects are: the HTML language, the HTTP protocol, the CGI protocol, Web cookies, the Perl language, the JavaScript language, and so on. All these subjects are explained in this site, and some others too.

What you will be able to implement in your site depends on the options given to you by the company that will host your Web site. The computer where the pages will be stored (known as the Web server or host) will be probably running under some version of the Unix operating system (common versions of Unix are FreeBSD and Linux). If you want to implement CGI scripts, you will need permission to install executable files in this machine.

To transfer your files, that is, to populate your site with your hand-crafted pages, you will use the FTP protocol. If you do not want to use the FTP protocol, usually the host company will provide you with some sort of file manager, accessible via Web, which will let you upload your pages. This is usually done through a Control Panel, where an option is to use a "file manager." This page in turn lets you to upload files, delete files, etc.

If in the page of the file manager you can see a folder called "cgi-bin," it means that you are enabled to upload scripts. The same applies if you do not use a browser but an FTP program to access your files: in the folder tree of the FPT program there must be a "cgi-bin" folder. This folder is where your scripts will reside. If you intend to run Perl scripts, the Perl interpreter must be installed in the host; this is always true in the case of a Unix server.

What is HTTP?

There exist rules that dictate how a computer exchanges data with another across the Internet. Each set of rules is called a "protocol." The Internet is more than the Web, which means that there are protocols that are not related with the Web. Nonetheless, many protocols that existed before the Web are now accessible from a Web page.

The protocol specific to the Web is known as Hyper Text Transfer Protocol (HTTP). The Internet itself as a network of computers relies in a protocol known as TCP/IP. Each computer in a TCP/IP network is identified by a URL (Universal Resource Locator) which is a particular kind of URI (Universal Resource Identifier). A URL is usually represented as four numbers separated by dots, as in 168.192.016.001 (leading zeros may be omitted).

When two computers communicate using the HTTP protocol, each of them is running a program that exchanges data with the other. The one in the computer where the pages are stored is called a "server" or, more specifically, a "Web server." Note that the name "server" is also applied to the computer (a.k.a. machine) where the server program is running. The program at the other side is called a "client" program. Client programs are, for example, MS Internet Explorer, Firefox, Opera, etc. They run in a "client machine."

What is of interest to us about the HTTP protocol is that it is a state-less protocol. This means that neither the client nor the server keeps information about the other machine once the connection is closed. The process of page retrieval goes on in the following manner: 1) the client makes a request to the server indicating the desired page; 2) the server sends as a response the page in question or a message stating why it cannot be retrieved.

It is unknown to the server if the page is the first page requested by the client or the fiftieth. Each request is independent of any other, but a great deal of information about each request is recorded by the server. Information about the URL of the client, the date, the time, the requested page, the page where there is the link that the user is following, the result of the request, all this and more is recorded in a file located in the server and usually known as the "server log."

This log is used by the hosting company to provide statistics to Web site owners. One important piece of information is the 'referrer.' When the user requests a page as a result of following a hyperlink in another page, this page is known as the referrer. However, when the request is made by selecting a favorite (or a bookmark), or by directly typing the page address, then there is no referrer or, as it is said, the referrer is unknown.

Information that often appears among the statistics of your site is the number of visitors that the site received in a given day. This may also show under the form of the average quantity of visitors per day. Anyway, it is information that it is not directly available from the server logs. A visitor is defined as a person that sits in front of a computer, and that browses one or more pages from your site. There is in the server log no representation of people. To send a page, the only thing the server needs to know is the URL that is requesting the page. A URL usually corresponds to a computer, and a computer may be used by many people. When a number of pages are sent to a URL there is no way to know how many were viewed by only one person.

Furthermore, there is something called dynamic assignment of URLs. The reason is that there is no need for each computer to be connected to the Internet using its unique URL, as many of these computers connect each day by only a limited amount of time. This may change as usage of broad band connections increases, but extensive usage of dial-up connections and the scarcity of URLs have led Internet service providers (ISP) to routinely reuse the URLs they have allocated. When a dial-up connection is established, the user's machine is assigned a URL, but when the connection is finished that URL may be assigned to another user. This is the essence of dynamic URL assignment.

The same procedure may be followed by a corporation wanting to use only a limited number of URLs for its employees' connections. When two successive requests from the same URL arrive to a server, nobody can tell if it is the same person who made both requests. In addition, no one can tell if the two requests came from the same machine.

How are then visitor counts made by a Web statistic program? It manages by doing some assumptions about users' behavior. For example, it may suppose that if the interval between two successive requests from the same URL does not exceed a predefined threshold, say thirty minutes, they belong to the same visitor. If a URL makes fifteen requests at intervals of no more than half an hour between one request and the other, it adds one to the count of visitors of that day, and to the count of page views of each one of the requested pages.

It can be seen that the information about visitors given by Web statistic programs is only an approximation based on certain assumptions, but nevertheless the procedure just described is a reasonable one for obtaining information that is not available otherwise.

How do I publish my pages to the Web?

Once you've created a page, you'll need a place to store it so it can be available for everyone to see. What you need is a site that offers web hosting. This is where all of your pages, images and other files will get stored. Fortunately, there are a lot of these around and some of them are totally free and paid for through advertising (banners located at the top and/or bottom of each of your pages).

I already have a domain. Can I get it hosted for free?

You sure can! There are a number of completely free domain hosting providers available on the net. While they are truly free, some of them require you to have a business-oriented website. One way to get around this if you have a non-business or personal homepage, might be to offer something (anything you can think of) for sale on your site. This way, you can at least qualify as a "business".

How can I sell stuff from my website?

The easiest way to sell things in a website is to become an “affiliate seller”, commonly known as just an “affiliate”. An affiliate is a person that sells things produced or delivered by other person or company. Companies selling their own or other’s products give people that have a website the right to represent them and earn a commission. This type of agreement is called an “affiliate program.” You sign up with a company to become its affiliate, and you can insert advertisements in your site’s pages, offering the company’s products. If a person reads your page, and clicks the link, he is derived to the company’s site, where he can buy the product. If he does, you earn the commission. To learn more about being an affiliate, browse affiliate programs, and in general know about everything an affiliate must know, just visit this site:

Associate Programs

How do I upload my files?

In order to upload your files, you'll need something called an FTP client. "FTP" is an abbreviation for "File Transfer Protocol" and it is how you send your files to the computer where your pages are being hosted on. Many of these FTP programs are available for free or next to nothing. I recommend Mozilla’s FTP program, called “FileZilla”. Ask the company that hosts your files for details about what type of information you should include in the various form fields of your FTP software. This information usually includes the following items:

The "Local Directory," the directory on your computer where the files are located.

The "Remote Directory," the directory where you want your pages to be located on your ISP's Web server. This directory might have the name "public_html," or another similar name. In the event of difficulty, your ISP will be able to tell you the correct name.

The "Server Name." This is the name that your ISP uses to identify the server computer's FTP service. For example, if your domain is called "mydomain.com," chances are you will use "ftp.mydomain.com" as an FTP server name. If this name doesn't work, you may have to ask your ISP how to access their FTP uploading service.

Your "User Name," also known as your login name.

Your password.

How do I get my own domain?

To obtain a domain, you will need to go to the following address...

http://www.namecheap.com

This is Namecheap.com' address. Namecheap.com is a company that sells domain names to businesses, organizations and private individuals. The first thing you will need to do upon arriving at their site is decide what you want to use for a domain name (i.e., "my_domain_name.com"). Next, you register it by typing in the name of the domain you want into the form and selecting a com, net, or org extension from the pull-down menu. If the name is available, you will be given the opportunity to register that domain through a series of steps. Namecheap.com charges an annual fee for the registration of a domain and getting your new domain set up usually takes only a few hours. Extensive help is available on their site in case you get in a pinch.

How to get feedback from users?

Do you want to give your visitors a means to send you e-mail right from your page? An easy way is to create a form button. The e-mail button below will bring up the default e-mail client with the address field already filled.

Here is the code I used...

<form method="get" action="MAILTO:george@harrison.net">
<center>
<input type="submit" value="E-mail me!">
</center>
</form>

The <FORM> tag tells the browser that a form will be going here. The ACTION attribute is used to tell the button what it should do when it is clicked, in this case, it will send mail (i.e., MAILTO:). The INPUT element is used to create the button that will submit the form's information when someone clicks on it, and the VALUE tag is used to specify a name for the button. Finally, the </FORM> tag closes the whole thing.

How to get my site bookmarked?

A method of allowing visitors to book-mark your site is including this code in the <HEAD> section of the page.

<script language="JavaScript1.2">
var bookmarkurl="http://www.widgets.com/"
var bookmarktitle="Wonderful widget site"

function addbookmark(){
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}
</script>

In the BODY section you have to include a link like the following:

<a href="javascript:addbookmark()">Add my site to your bookmarks</a>

An easier (although much different) method is to create a simple text or image link that they can simply drag from your page onto their desktop. For example:

Wonderful widget site

This is really just a simple text link. You must give your visitor instructions to drag it onto his desktop. This will create a default browser icon that can be clicked when the visitor wishes to return to your page.

An image may be used instead of a text link but a default browser icon will still be placed on the desktop. When using an image, the title of the icon must be included in the ALT attribute of the image.

Here is the code:

<A HREF="http://www.widgets.com/"><IMG SRC="samples/book.gif"
ALT="Wonderful widget site"></A>

and here is the link:

Wonderful widget site

Go on! Try this now!

How to update my site?

You must take care of some details about the maintenance of your site.

Create the pages and resources you want to upload onto the Internet in a special, separate directory that has been set aside for your Web site, for example, let's say a directory called "c:\web\project". This will be the "Local Directory" for the FTP program.

When you create directories and pages, be sure that there are no spaces in the names. Internet servers won't tolerate spaces, and neither will the FTP program. For example, instead of calling a file "my pretty page.html," call it "my_pretty_page.html" instead.

Pay attention to the case of the file names of your pages, graphics, and other resources. This is one of the most common problems in Web page development. The Windows operating system does not care what case you use for a file name--the names "foobar.gif" and "FOOBAR.GIF" are treated the same. But on a Web server, case matters. You may find that your page will work perfectly on your home machine but not at all when you upload it--file name case is often the reason. You should make a policy to be consistent about case, and lowercase is generally preferred. When you are designing your site, always be consistent about the case of file names, that is, the HTML tags that call for files should be in the same case as the file names themselves. This is a common problem when uploading for the first time--if you pay no attention to case on your local machine, your page will still work, because Windows doesn't care about case, but UNIX servers do care.

Another issue is translation. Windows uses a rather peculiar internal format for text files. At the end of each line, there are two control characters--a carriage return and a line feed. On other types of operating systems like UNIX, there is just one--a line feed. This means that a program that uploads files to the Internet has to pay attention to the file type being uploaded. If it is a text file, it must be translated. If it is a graphic or binary file, it must be copied exactly.

Upload Strategies

There are several strategies to save time in performing Web site maintenance. The point of these strategies is to only upload files that are changed.

The archive method. The most efficient way to detect changed files is to sample their "archive bit." The archive bit is part of the directory entry for a changed file. In this method you upload all changed files and then reset the archive bit on each uploaded file, thus preventing a repetition of the same upload later. If you make further changes to that file, the archive bit will alert that this file needs to be uploaded again. You can manually set or reset archive bits using Windows Explorer, either one file at a time or for an entire directory. See your Windows documentation for more on this method.

The date method. Some users will have other purposes for the archive bits and will not want to reset them. Another strategy is to select an age for new files. In this method, if you select an age of one day, all files not older than one day will be uploaded onto your site. You can choose any age for this method, from one minute to several weeks.

Upload all files. This final method is useful when you are just setting up a site (or when you are not sure what happened to your files!). In this method all files in the remote server are replaced by the local files.

How to promote my website?

Once you've created a Web page, there is still much more to do. You can't just stick it up there and expect the traffic to roll in. You have to let people know about yourself. You have to publicize your site. There are a number of ways to do this.

Search engines

Search engines are a good place to begin submitting your site and making it available to the public at large. However, unless you really know what you’re doing and have a good knowledge of how meta tags (and search engines) work, you may end up on page # 5,837,480 instead of close to the top where people will be able to find you easily without having to dig too deeply. Still, they can be a valuable resource and should not be overlooked. Most search engines have a place on one of their pages where you can easily submit your URL (Uniform Resource Locator) and it can take from one day to 6 weeks before you finally show up on one of their pages. There are also quite a number of services that will allow you to submit your site to 10-15 search engines for free or a much larger number for a small fee.

Newsgroups

You want to be very careful not to overuse these, since posting off-topic can get you "flamed" (harassed) or, worse yet, in big trouble with your ISP (Internet Service Provider). When you do post, try to post in only a few at a time and make sure to post in the ones that are in some way related to what you are offering. For example, if your site offers games, you would not want to post in a newsgroup where the topic was "fine dining".

Banner exchanges

There are quite a number of free banner services available on the Internet. These banner services can generate quite a bit of traffic for your site. They usually have a "sign-up" page where you fill out a small form telling them a little about you and your beloved site and are then given some HTML code to post on your page. This code contains the remotely-hosted banners of other members who are using the same service and when someone visits their page, they see your banner and (hopefully) click on it, which of course, takes them to your page.

Reciprocal linking

Reciprocal linking is a good way to generate traffic to your site and make a few friends in the process. You start out by looking for sites that have content similar to yours but that don't compete with what you are offering. In other words, if you are selling pet supplies, you might go to another site that contains information on dog breeds and send the site owner an e-mail asking them if they would mind placing a link back to your page on their site and, of course, you would do the same for them.

Ezines

Ezines are another way to get publicity for your site. Ezines are actually online magazines. The normal procedure is to go to a site and find an e-mail link to the editor. Next, you send this person an e-mail briefly describing your product or services and what you have to offer. Be very careful not to look unprofessional and check for any spelling errors or improper punctuation before sending it. Editors of these ezines go through hundreds or even thousands of mails each day and a long, rambling letter or an amateurish looking one can quickly end up in the trash can.

Software archives

This is a great resource if you know how to write your own programs or have something you can offer people as a downloadable package (i.e., a program, graphics collection, etc). Most shareware or freeware archives are very prompt when it comes to listing your files and many have their site set up so that you can post and update your own listing.

Word of mouth

Word of mouth is another good way to gain some much needed publicity for your site. If you have a good product or service, people will talk about it. They will tell their friends who, in turn, will visit your site themselves to see what all the fuss is about. It is a good idea to create a small banner or animation representing your site and make it available for people to post on their page if they want to.

Guestbooks

Two things. (1) Be kind. (2) Don't spam. Guestbooks can generate quite a bit of traffic to your site but you don't want to overdo it. While you don't want to place a full-page ad in someone's guestbook, you could put a line or two in it that say's "Great page! Be sure to visit my site and be sure to download my free animated GIFS while your there."

Message boards

This works pretty much the same as signing someone's guestbook. Be careful not to spam though or the end result may not be what you hoped for. Use sound judgment.

Chat rooms

Chat rooms are a good way to make friends and casually mention during the conversation that you have this great site...blah...blah...and tell them about what you have to offer them. If you are in a large public chat room, you can fare quite nicely.

Free-links pages (FFA)

These are pages that usually have a very long list of links where everyone is posting their address with their caps-lock on hoping their link will stand out from all the rest. Pretty soon the page gets filled up with hundreds of nameless links until yours eventually goes among the missing. Still, it can be a good resource if you can find one with a neatly categorized list or better still, a search feature.

Previous | Contents | Next

| HOME | FEEDBACK | BOOKMARK |
Build your Website
© 1999-2008 Hector Castro -- All rights reserved

www.great-web-info.com