Part 2.- Storing Data on the Internet
In the previous post, we looked at how we are what the internet is and how we are able to access the internet.
In this part, we’ll look at we’ll look on how data and information are stored on the internet (i.e. websites) and how you are able to retrieve them with your browsers, and thus if possible how much it costs to setup (store) your own website on the internet.
While all these writings may seem irrelevant, in due time you will understand the importance or reason why I’m taking this method to introduce web design/development to you. Without further addo, let’s dive right in.
Lots of information and data are stored on the internet on a daily basis, either for private or restricted use, e.g. your backups or public access and make available for others to use. These stored data are usually accessed via websites. Statistics shows that there are over 330 million websites on the internet as at 2017.
Websites’ data and information are stored on special computers called servers that are always connected to the internet (i.e. online 24/7). When a server is offline, you get an “unable to connect to server” error message.
Servers usually have very fast and powerful processors and terabytes of memory storage. Their operating system could be linux, windows, etc.
Facebook and other social media gives you the opportunity to store and showcase your data and information on their servers for free, which are accessed via their website facebook.com.
Google gives you various services such as Gmail, Google drive, YouTube, etc to store and send emails, backup your files or upload videos, etc respectively. They also provide the blogger.com service for bloggers to host their blogs for free.
Your school also stores your information on their servers if they have any which is accessed from the school’s website.
And so on….
When you try to access any website or retrieve any data from the internet, your web browser sends a request across your various channels of internet connection querying every online server until it finds the gateway that gives a matching response and then it establishes a connection.
As you interact with the website, you may be required to provide some details to be able access some restricted information after authentication e.g. your facebook username and password.
While all these may seem like a lot, data processing via the internet is usually very fast and can occur in milliseconds.
Websites and Cache
Because signals can be lost or changed due to interferences or poor signals which will most likely lead to a change in your IP address, most web browsers are optimized to make use of cache, which is an allocated space of your device’s RAM.
A web browser can retain fully retrieved contents such as a media, webpage, etc by downloading them temporarily to the browser’s cache. (This is why your subscription data reduces as you visit web pages, load images, stream videos online, etc).
After a short period of time, usually when your RAM is almost used up or when you exit the browser, the temporarily downloaded content is lost. To save the file permanently on your device, you have to manually download it to your device storage.
Another form of data stored on your browser’s cache is a piece of information called cookies. Websites are designed to store cookies on your browser’s cache, but for a longer period of time, usually till you clear your browser’s cache or the cookie reaches its expiry date (as set by the web developer).
When present, a website first checks the cookie to retrieve and update it’s stored data with which it can use to “remember” your browser even if the IP address has been changed in order to resume a private session after the interference, for example, resume downloading a file, accessing your email or social media without having to log in over and over again.
As we have already established in the part one of this writeup, all computers connected to the internet has IP addresses. Servers too have IP addresses. For example, Google IP address is 18.104.22.168 and 22.214.171.124, while that of facebook are 126.96.36.199 – 188.8.131.52 and 184.108.40.206 – 220.127.116.11. Because of their constant and stable access to the internet, fast processors speed, and are more regulated and controlled, their IP addresses remain unchanged.
This goes also for all ISPs and server companies. This means that no matter which route you take to connect to the internet, you will always find them at the same location on the internet.
And this is what makes websites different from your devices at home. Your website and it’s contents can always be accessed at the same location on its host server but your device can’t always be found on the same location as it’s constantly changing and that’s why you need cache to achieve a somewhat false stable end-to-end connection.
And this is why you have to depend on web hosting companies and their servers to host your website on the internet and why you can’t truly or effectively host you website on your own personal computer.
Web hosting is simply a phrase used to describe storing websites on a server connected to the internet.
Web Hosting Companies
There are some profit-driven companies (could be a tier 1, 2 or 3 ISPs or even a client) that have servers for storing websites on the internet and give you the ability to host your website on the internet usually for a token. They are called web hosting companies.
Just like it’s expensive to run an ISP, so also is it expensive to run a web hosting company. A web hosting company have to cover cost of buying, installing, maintaining and upgrading servers, setup, constantly power and keep the servers online, pay staffs, etc as well as make profit.
Thus, web hosting companies usually charge their clients a fee to allocate space on their servers to host their websites. They present to you various options or plans with various specs (storage space, bandwidths, databases, number of domains, sub-domains, etc) and prices to buy, which gives you the opportunity to host your own website and it’s contents on their servers.
You can chose to pay on the fee on a monthly or annual basis. Prices differ with plan and also with the web hosting company, while some offer free hosting plans as well.
After you pay for a plan, you will be allocated a folder called root directory on their server to store your website and it’s contents. As we already know, your website content could be all media, sub-folders or sub-directories, HTML, CSS, PHP, etc files.
They all have a path to access them directly from your website URL. E.g. mywebsite.com/images/logo.png. You will be given a dashboard called Cpanel to install,setup and manage your website. In another class, we’ll take a look at this Cpanel.
Domain names are simply “lettered” or “alphanumerical” addresses. E.g. facebook.com, google.com, mywebsite.com, etc. They are used to point to a website on a web hosting server after following the domain name configuration provided by the web hosting company. E.g. pointing the domain name to the web hosting company nameservers. They are useful because they are easier to remember when compared to IP addresses.
Domain names are formed by the rules and procedures of the Domain Name System (DNS). Any name registered in the DNS is a domain name. Domain names are organized in subordinate levels (subdomains) of the DNS root domain (your root directory takes your root domain name e.g mywebsite.com while your sub-directories usually takes your website’s subdomains, e.g. mywebsite com/blog).
Paid domain names are called top-level domains (TLDs). They include the generic top-level domains (gTLDs), such as the prominent domains com , info , net , edu, and org , and the country code top-level domains (ccTLDs) such as uk, in, co.uk, ng, com.ng, etc. Free domain names are usually subdomains such as mywebsite.blogspot.com, freenom domain names such as ga, ml and tk.
Some companies called domain registrars obtain license from domain names regulating bodies, e.g. ICAAN, NIRA (Nigeria’s .ng domains), etc to sell and register domain names to you for a token. Some web hosting companies are also domain registrars, i.e, they provide both domain registration and web hosting.
However, it’s up to you to choose to buy your domain name and web hosting from the same or different companies. It won’t affect your website in any way as long as you configure your domain name to point to the server (nameservers) of the other company hosting your website.
When a domain name is entered into a web browser, it sends out a request across the internet, the registrar where the domain is registered look up its record of the domain and respond by pointing the browser to the web hosting company’s server (according to the configurations) which easily query/search it’s database of folders for the one that matches the domain name and render it’s content to your browser. URL paths and cookies will also be put into account by the website.
Domain names are paid for (renewed) on yearly basis and their prices slightly vary from registrar to another. You can only buy/register domain names not already owned/registered by another website. For example, you can’t buy twitter.com, nairaland.com, etc.
To run any website on the internet, you need to have a domain name and web hosting.
Below are a list of popular domain name registrars and web hosting companies:
- Domainking.ng, etc.
You can check them out to see their fees and discounts (if any) for registering and renewing domain names as well as their various web hosting plans.
This is where we draw the curtain on how the internet works. So far we’ve covered how computers are connected over the internet, ISPs, IP addresses, servers (nameservers), domain names, why it’s difficult to host a website on your device and why you need web hosting servers and domain names, etc.
With the little we have learnt so far, we can now fully dive into web development and coding.