Free Consultation? Call Us At (678) 200-2497

How a Website Works


How websites work

Websites work through a client server model with a request response framework. A web server determines what page should be served if the link is not fully qualified (does not contain an actual file to be displayed). This file is usually index.html file or some index file based on the server language.

So what happens when you enter a website and hit enter. You’re saying hey world, I request to go to the computer that can send me the content located at this website address. In reality, the address is translated to a number which is assigned to an actual computer that has the response to your request. The computer then serves us a page most likely with the default (index.??) file if we do not fully qualify the address with an actual page request.



Before we dive further and to simplify the model, this client server relationship is just like 2 people talking to each other. You are one person and the website you are requesting is the other. So you might say, “hey, give me a scooter”. The person you are talking to looks to see if they have a scooter and if they do, they’ll return the scooter in the response to you and say all is good with 200 response. However, they might not be able to find the scooter and may wonder how you thought to ask them for a scooter as it was probably a mistake. In that case, they won’t be able to satisfy your request and will return a 404 response with a sign that says, sorry, I don’t have a scooter.

The web server is what actually serves the page to the different clients trying to request the page from it on port 80, the default port for http (hypertext transfer) protocol. Recall that you are really requesting a file that sits on a computer when you hit enter after typing in a web address. So when you type a website into your browser, it goes through a complicated process of finding what you you’re really trying to find and it gets the start file, usually index.html. So first it finds the server and then it finds the file that needs to be served which can be through a process of you entering it or indirectly through an .htaccess file. This is a simplified article so we won’t go deep into the details.

So let’s say we go to Best Buy website as I seem to shop there quite a bit. So we type in http://www.bestbuy.com. The network goes to find best buy’s computers / servers. It says hey this person wants to request the home page. It processes that returns the home page and then you are able to view the home page based on the processing scripts on best buy servers. This creates a connection between you and best buy and your subsequent requests can basically have sessions or cookies etc etc, but basically you have a client server model where you make a request as the client and the server responds to your request. Then you can make more requests and the responses continually get answered with a 200 status. If it can’t find the file you want, it will return a different status based on what the server finds, but it will eventually return a response back to you, the client.

So assuming you add a page to your website, you must understand web pages are stateless. It doesn’t remember anything from page to page unless you add different mechanisms such as cookies or sessions to your website. Which means if you request a page, it’s always going to request the same file which will usually respond the same way unless it’s a dynamic file which still requests the same file but may respond a tad differently based on cookies and sessions and how the dynamic file processes the current data of the session.



So let’s say you have a website and you add an about us page. First you’ll want to create the page. Once you create it and upload it to your server, it is now a page so anything that requests that page will request that file which in turn will display the page. So you can add that to your header menu and say you want to add a link to this about us file. Once you do that, you can add that same link to your footer links. You can just create a link with text and link to the same file. So all links to that file will request that file from your server because it is a stateless protocol where it retrieves the file in order to fulfill the response that was requested when you typed in the website name. So it’s actually a pretty simple model. Within that model is a ton of complications to make it work for everybody to use simultaneously and all of us can feel comfortable that all of our private information is safe.

If you think about the complexities of that based on what you’ve read so far with this very simple overview of how websites work, it can get very complicated and very advanced and when hackers enter the picture, in other words when the black hat bad guy hackers step into the picture, you can get compromised if you don’t have competent programmers. But you still want to have the ability to be able to provide your service or product to the whole world the whole USA so it’s still a great thing, a great investment to make, you just have to understand that there are tons of complications that go into how a website actually works.

The main thing it really does is when you request a file through your web browser, it finds that file somewhere on the internet that is closest to you. It gets the file, processes the file and returns a response from that file and you’re able to view the response in your web browser. At which point, you can then send another request back to the same computer to in essence view other pages on that computer. Hope that was helpful. Thumbs up if so.


jimi author

By jimi

Jimi is an expert software architect and photographer. He enjoys taking on new challenges and learning as much as possible during each challenge. He also enjoys swimming, biking, and hiking.

Would You Like To Share Your Thoughts?

Your email address will not be published. Required fields are marked *

Mobile version: Enabled