Navigation 
 Home 
 Search 
 Site map 

 Contact Graeme 
 Home 
 Email 
 Twitter

 Skip Navigation LinksMath Help > Webmaking > Starting > What Is A Web Server?

The Internet can be a mysterious thing.  The intent of the page you're now reading is to demystify the Internet, if only slightly.  Mainly, I'll explain what a server is.  Along the way I'll explain many other things, like URL's and what it really means to put something "On the Internet".  If you already know this stuff, go ahead and click "Next".  Otherwise, read on if only for a quick refresher course.

A web server is a program running on a computer that responds to requests from your browser, produces a response, and sends it back to your browser.  The web server is "on the Internet" because it has an address, like microsoft.com, which is known to all the other computers on the Internet.  The computers that keep track of all the web servers are called Domain Name Servers (DNS).  All the other computers consult the DNS to find each other.  That's also how your browser knows where to send the requests.  A web server should be running all the time, because the Internet never sleeps.  It should have a fast network connection and must have a static address (that is, the address must never change).  For these reasons, your home computer can't be used as a web server.  Instead, you should sign up with a web hosting company so you can use their web servers to host your web site.  I'll explain more about that on the next page.  But first, more definitions.

A request is, in essence, the URL you type into the "location" field of your browser, or that is hidden behind a link on a web page.  (Have you ever noticed that when you "mouse over" a link some information appears at the bottom of your screen?  This is the hidden meaning of the link, which is an action to be performed by the browser if you click the link.)  The request contains your address (think of it as your "return address") and some information about you, like the kind of browser you're using.  The request is sent to the web server, which then processes it, creates a response, and sends the response back to you.

A response is, in essence, a computer file.  Usually, the response is simply a file stored on the server, which has the text of a web page to be displayed on your browser.  Often in the web page there are embedded references to other files, such as images.  Silently your web browser sends requests to the server for each of these embedded files.  The server doesn't send them until the browser asks for them.  Why?  Because the browser might have already asked for this file (and stored it in its cache) so it can save time by using the file it already has.  As the responses come back from the server, your browser assembles them into a web page like the one you're looking at now.

A URL is "Uniform Resource Locator" that is a standard form that is understood by all web servers in the world.  Normally, a URL looks something like this:

http://2000clicks.com/WebMakingStartingWhatIsAServer.asp?p1=3&p2=4 

The URL is composed of many parts.  Each part has special meaning.  Here is a full explanation of the URL and its many parts.

A browser is a program that runs on your PC whose main purpose is to send requests to servers, and display the responses that come back from the servers.  This is a complicated matter, not only because of the detailed formatting the browser needs to do, but also because the response from the server might include a program that must be executed on your browser.  For example, the question and answer session in this section is really a program that is executed by your browser on your PC.

After it displays the response from the server (the page you requested), and while it executes the programs that might be included in that response, the browser waits patiently for you to click a link.

A link is a visual element -- a picture, or a word, typically underlined -- that has a hidden meaning, which is not displayed but instead is an action that will be done by the browser when that element is clicked.  Most commonly, the action is to send a request to a server, not necessarily the same server you last "talked" to.  In fact, this is what gives the Internet its great appeal: the great ease with which files sent by one server can link to requests to be sent to another server.  The links are what make the Internet truly a World Wide Web.

A Domain Name Server, DNS, is a computer program that keeps track of the domain names (remember that a domain is a collection of one or more computers) of all the computers on the Internet.  In order to have a web server on the internet, the server must be part of a domain.  The domain must have two DNS servers in addition to the web server, and the domain name must be registered with an authority, such as Network Solutions.  The Internet addresses of your domain's DNS servers are sent to all the DNS servers in the world so that every other computer on the Internet knows how to send a message to servers in this domain.  Your DNS servers, in turn, give the Internet addresses of all the computers in your domain.

OK, so What's Running on My Computer, Then?

I know this can be confusing.  If you are putting together a web site, you'll contract with a hosting company to provide a web server.  On your computer, you will run Microsoft FrontPage, and use it to create pages directly on the web server.  FrontPage is running on your computer, but the web server software is running on the hosting company's computer.  If you write ASP programs, they are stored on the web server and execute on the web server.  If you write JavaScript programs, they are stored on the web server but execute on the user's browser.

Summary

To recap, a server is a computer program whose primary purpose is to accept requests from browsers, and send responses (which could be files or they could be the output of a program that runs on the server) back to the browsers who sent the requests.  To be "On the Internet" a Server must be part of a domain, and the domain must be registered.  The domain must have two DNS servers.  The DNS servers and your web server should be on all the time, and should be dedicated to web serving.

These requirements mean you will need to invest in some pretty substantial computers and data network components if you're going to run a web server.  Luckily, there are businesses, called web hosting companies, set up to do this for you, and for a modest price.

 

URL Demystified

A URL is "Uniform Resource Locator" that is a standard form that is understood by all web servers in the world.  Normally, a URL looks something like this:

http://2000clicks.com/WebMakingStartingWhatIsAServer.asp?p1=3&p2=4 

Let me dissect this URL for you.

The first part, http:, is the protocol.  The protocol tells the server what computer language should be used in the response.  HTTP is "Hypertext Transfer Protocol".  Another common protocol is FTP, which is File Transfer Protocol.

The next part, //www.2000clicks.com, identifies the particular server to which the request will be sent.  The last two words, 2000clicks.com, form the domain name.   A domain is a collection of one or more servers.  The first part, www in this case (although it can have any number of words separated by dots), identifies a particular server in this domain.  (Many people think the "www" is a required part of an Internet address, but in fact all it does is identify a particular computer named "www" at the domain in question.)

The last part, WebMakingStartingWhatIsAServer.asp?p1=3&p2=4, is a message sent to the server.  Usually it is a file name.  Files usually have names that end in ".html" or ".htm".  But in this case the last part of the URL is a program -- an ASP program -- with parameters.

Let me explain what happens on the server when it gets a message such as

WebMakingStartingWhatIsAServer.asp?p1=3&p2=4

The server sees this, and begins running a program called WebMakingStartingWhatIsAServer.asp, which it finds in the directory named GettingStarted, which, in turn, is in a directory named WebMaking.  When this program begins executing it asks for the values of the parameters p1 and p2.  Then it does calculations using these parameters -- a program can do anything, but this one simply multiplies them together -- and displays the result.

Click the URL, below, to send this request to the 2000clicks.com server:

http://2000clicks.com/WebMakingStartingWhatIsAServer.asp?p1=3&p2=4 


The webmaster and author of this Math Help site is Graeme McRae.