Computer4U logo
Plus Two Computer Applications · Chapter 07

Web Hosting

4 sections
Live HTML playground
9 review questions
7.1

Web Hosting

7.1

Making a Website Available on the Internet

A website built from several linked HTML pages sits on our own computer until it is uploaded to a web server connected to the Internet. For this, we either rent storage space on someone else's web server, or set up and maintain our own — and setting up a server of our own is far more expensive than renting space.

Web hosting is the service of providing storage space on a web server to serve the files of a website to the Internet. Companies offering this service are called web hosts. They own and manage the web servers, keep them connected around the clock, and often bundle in extra services such as databases and support for languages like PHP, Java and ASP.NET.

7.1.1

Types of Web Hosting

Web hosts sell standard packages of space (10 MB, 20 MB and so on), so the site's actual size, the number of expected visitors, and any need for databases or server-side scripts all decide which package — and which type of hosting — fits best.

Shared hosting — cheapest, many sites share one serverDedicated hosting — one client leases the entire serverVirtual Private Server (VPS) — one physical server split into independent virtual servers

Shared hosting is the most common type: many different websites live on a single server and share its RAM and CPU. Its features are basic and inflexible, but it is cheap, easy to use, and the host takes care of software updates and security — well suited to small, low-traffic sites. The drawback is that one site's traffic spike can slow down every other site on the same server.

Dedicated hosting gives the client the entire server and all its resources, with full control over its hardware and software — the choice of large organisations and government departments with heavy traffic. Dedicated servers are usually housed in data centres that supply connectivity and round-the-clock power, cutting the client's own setup cost, and because bandwidth isn't shared, access is faster. If the client instead places their own purchased server in the provider's facility, that arrangement is called co-location.

A Virtual Private Server (VPS) is a single physical server virtually partitioned into several independent servers using virtualization technology. Each VPS has its own operating system, web server software and installed packages, and — unlike shared hosting — a dedicated share of RAM, so each behaves as if it were a fully separate physical server. Its users may install and configure their own software and restart their VPS without touching any other virtual server on the same machine. VPS hosting gives dedicated bandwidth at a lesser cost than full dedicated hosting, making it a good middle ground for sites that have outgrown shared hosting. Popular virtualization software includes VMware, VirtualBox, FreeVPS and Microsoft Hyper-V.

7.1.2

Buying Hosting Space

Once the site's pages are ready in a folder on our computer, they must be copied to a web server to go live. Shared hosting is usually preferred here for being cheap and appropriate, so the type of server decided, hosting space is then bought from a provider.

Several factors matter when buying space: how much storage the site's files need, and whether any programming content in the pages needs supporting technology such as a database or a scripting language. This also decides between a Windows server or a Linux server — a site containing only HTML can run on either, but features like database support or e-mail facilities may steer the choice.

7.1.3

Domain Name Registration

With hosting space bought, the site still needs an identification — a URL — on the Internet, so a suitable domain name must be registered. Most web hosting companies also offer domain registration, and a suitable name must first be checked for availability, since it may already be taken.

Sites such as a host's own checker, or independent ones like www.whois.net, look this up against the ICANN database of all registered domain names. If the name is free, registration proceeds by filling in WHOIS information — the registrant's name, address, phone number and e-mail — which can be published or kept private as the registrant wishes. Paying the annual fee then registers the domain in our name.

Once bought, the domain still has to be pointed at the web server storing the pages. This link is made using the domain's A record (Address record), which stores the IP address of the connected web server and can be edited from the domain's control panel. Only once the A record is set can the DNS servers resolve our domain name to our web server.

7.1.4

FTP Client Software

With hosting space and a domain in hand, the website's files still need transferring from our computer to the server — the job of FTP client software, which uses FTP (File Transfer Protocol) to connect to a remote server. Connecting needs a username, password and the domain name, entered into the client's Site Manager.

Plain FTP sends the username and password as unencrypted text, so most hosts today use SFTP — FTP over the Secure Shell (SSH) protocol — which encrypts usernames, passwords and data in transit.

Once connected, the client's window is typically split in two: our own computer's folders and files on one side, the web server's on the other. Files are uploaded either through a menu option or by dragging and dropping them across. Popular FTP clients include FileZilla, CuteFTP and SmartFTP. Some hosting companies instead provide their own browser-based control panel for uploading files, and don't allow third-party FTP clients to connect at all.

7.2

Free Hosting

7.2

Hosting Without Cost

Free hosting providers cover their expenses by displaying advertisements on the sites they host. Some let us upload our own files, usually with restrictions — a cap on file size (often 5 MB), and audio or video files such as MP3 or MP4 may not be permitted at all. Others allow only pre-formatted templates, offering no way to upload external files of our own.

A free-hosted site is usually reached through the provider's own subdomain (oursite.example.com) or as a directory (www.example.com/oursite), and some free hosts even offer domain registration alongside. Free hosting suits groups sharing content for a common interest — family unions, nonprofit organisations — who cannot spend money on hosting, though the falling cost of paid hosting has reduced how often it's needed. Sites.google.com and yola.com are examples of free web hosting services.

7.3

Content Management System

7.3

Designing Without Repetitive Coding

A Content Management System (CMS) is a web-based software system for creating, administering and publishing websites, giving even people with little technical knowledge an easy way to design and manage an attractive site.

Most CMS software is free to download; its files are simply copied into the hosting space and the site configured from there. Many CMS packages also offer downloadable templates — ready-made designs — that a user picks from a list, uploads, and then fills in with titles, images and descriptions, an experience about as simple as writing a document in a word processor.

Beyond convenience, a CMS builds in standard security features by design, and its templates avoid repetitive coding for the headings and menus repeated across every page, adding them internally instead. Templates can be downloaded free or bought cheaply, and third-party vendors will even customise a CMS for a fee. WordPress, Drupal and Joomla! are among the most popular CMS platforms, and many organisations, bloggers and even the Motor Vehicles Department of the Government of Kerala use them for their own sites.

If hosting on a shared server, it's worth checking that the server actually supports whichever CMS has been downloaded before relying on it.

7.4

Responsive Web Design

7.4

Fitting Every Screen Size

Web pages today are browsed on desktops, laptops, tablets and mobile phones, each with a different screen size. A page designed only for a desktop screen is awkward on a phone, often forcing the user to scroll sideways just to see the rest of the content. Maintaining two separate sites — one for desktops, one for mobiles — used to be the workaround, but it created its own maintenance headaches; it's far better if a single page adjusts itself to whichever screen it's viewed on. This approach is called responsive web design, a term coined by the independent designer and author Ethan Marcotte.

Responsive web design is the practice of building a website suited to work on every device and every screen size, whether mobile phone, desktop or television, and rests on three techniques working together:

Flexible grid layouts — fit the page to the display sizeFlexible images and videos — scale media to the display's percentage sizeMedia queries — apply different styles per device inside the CSS file

A media query, for instance, might convert a horizontal menu meant for a large display into a drop-down menu on a phone. Since screen sizes range from wearables and phones right up to televisions, designing every website to adapt to its viewing device has become essential rather than optional.

Try It Yourself

Live HTML Playground

Edit the code on the left and press Run to see the result on the right — this is the kind of simple home page you'd upload to a web server once your hosting space and domain are ready.

index.html
Self-Assessment

Question & Answer Review

Tap a question to reveal the answer — a quick way to check understanding of web hosting.

01What is web hosting, and what is a web host?
Web hosting is the service of providing storage space on a web server to serve a website's files to the Internet. The companies that provide this service are called web hosts.
02List the factors that decide the type of web hosting.
The amount of space needed for hosting, the number of visitors expected to visit the website, and the use of resources like databases and programming support.
03What is VPS, and what does it stand for?
Virtual Private Server — a single physical server virtually partitioned into several independent servers, each with its own dedicated share of RAM and its own operating system and packages.
04What is co-location?
When a client is allowed to place their own purchased web server inside a dedicated hosting service provider's facility, that arrangement is called co-location.
05What does WHOIS information contain?
Details of a domain's registrant, including name, address, telephone number and e-mail address, along with ownership details, registration and expiry dates — and it's used to check whether a given domain name is available.
06Why is the 'A record' important for a domain name?
The A record stores the IP address of the web server connected to a domain. Without it correctly set, the DNS servers cannot resolve the domain name to the web server storing the site's pages.
07What is the advantage of using the SFTP protocol in FTP software?
Plain FTP sends usernames and passwords as unsecured plain text. SFTP uses the Secure Shell (SSH) protocol to encrypt usernames, passwords and data during transfer, making it secure.
08What are the advantages that free web hosting companies provide?
They provide hosting free of charge (covering costs through advertisements on the hosted site), often with a control panel to upload files, and some even offer domain name registration — useful for groups who cannot spend money on hosting.
09What is CMS? What are its features, and give examples.
A Content Management System is web-based software for creating, administering and publishing websites. It provides standard security features and ready-made templates that remove the need for repetitive coding of headings and menus. WordPress, Drupal and Joomla! are examples.