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.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.