Information Technology Topic
Publishing and Maintaining a Website
- Read notes
- Flashcards
- Quiz
- Confident
Study focus - 3 things
- Publishing means copying your site files to rented space on a hosting company's web server, and a domain name is the readable address visitors type to reach it
- A domain name is rented, not bought: you register it through a registrar, check the spelling before paying, and renew it to keep it
- You upload with FTP (or the secure SFTP) using details the host gives you, and you maintain the site by editing, retesting and re-uploading the changed files
Section 1From your computer to the web
Until you publish, your website exists only on your own computer, and nobody else can see it. Publishing means putting the site where visitors can reach it. The route has three parts. You need web hosting, which is rented space on a hosting company's web server for your site files. You need a domain name, the readable address people type. And you need a way to copy your files to the server, which is where FTP comes in. Some hosting is free for a basic site, and some hosts charge a monthly fee. The order does not matter much: many people choose a host first and the name afterwards, or the other way round. What matters is that all three are in place and that you test the live site once it is up.
Section 2Domain names
Every web server has a number address (an IP address). Numbers are hard to remember, so a domain name is a human-readable address that stands in for the number. Here's the trick: read a domain name from right to left. In www.mandevillebakes.com the rightmost part, com, is the top-level domain. Next comes the name you chose, mandevillebakes, and www comes last. Top-level domains include .com, .org and country codes, such as .jm for Jamaica. A few are restricted: .gov is for government and .edu is for education, so you cannot just register those. Easy to mix up: the domain name is the address, not the website. The website is the files on the server; the domain name is how people find them.
Section 3Registering a domain name
You do not buy a domain name. You pay to use it for one or more years, and you can renew it when the time is up. Keeping the name means renewing it. You register through a registrar, a company that handles registrations. (Registries keep the official records behind the scenes.) The steps are: go to a registrar, check that the name you want is free (a lookup often called whois), fill in the form, pay, and wait for confirmation. A real-world address is required. Watch out: check the spelling of the name very carefully on the form, because it cannot be changed after you have paid. The price depends on the top-level domain and on the registrar, and prices change, so always read the price on the registrar's page rather than trusting a number from a book.
Section 4Finding a hosting company
To locate a hosting company, search for hosts and compare what they offer. Different hosts suit different sites: some hosts are free for a basic site, such as a class project, while others charge a monthly fee. One thing to check is whether the host supports SFTP, the secure way to upload (see the next note). Plain FTP is not secure and many hosts no longer support it. If your domain name and your hosting come from different companies, you must connect the name to the host, so that people who type the domain reach your host's server. The host explains how, and the change can take time to spread across the internet. Once the host is chosen it gives you a set of connection details. Keep them safe, especially the password.
Section 5Uploading with FTP
FTP (File Transfer Protocol) copies files from your computer to the host's server. SFTP is the secure version, and it is the one to prefer. The host gives you five things: the server address, a username, a password, a port number and the remote folder where the public files go (for example a folder named something like htdocs). To upload: open an FTP program, type in the five details and connect. You will see your computer's files on one side and the server's folder on the other. Drag the site files into the remote folder. Keep the same folder layout on the server as on your computer, with pages in the same places and pictures in their images folder. Otherwise your relative links will point at files that are not there. When the upload finishes, open the live site in a browser and test it.
Section 6Maintaining the site
A website is never finished. Opening hours change, prices change and a new product needs a photo. Maintaining a site means keeping it up to date and working. The routine is simple. Edit the pages on your own computer. Test the changed pages. Upload only the files that changed (and any new files), using the same details as before. Then check the live site. Other jobs keep the site healthy: check the links from time to time, because other websites move their pages; renew the domain name before its registration runs out; and keep a copy of the whole site on your own computer as a backup. Example: a site has 12 files. You edit 2 pages and add 1 new picture. You re-upload 3 files, not 13, and the other 10 stay as they are on the server.
Examples
A Mandeville bakery wants the domain name www.mandevillebakes.com (an invented name, for practice). Use these invented prices: the domain costs US$14 a year and hosting costs US$6 a month. (a) Read the name from right to left and identify the top-level domain. (b) How much does the domain cost for 3 years? (c) What is the total cost of the domain for the first year plus 12 months of hosting? (d) The owner says she is buying the name for ever. Correct her. (e) Why should she check the spelling before paying?
(a) Right to left the parts are com, mandevillebakes and www, so the top-level domain is com. (b) 3 years x US$14 = US$42. (c) Hosting for 12 months is 12 x US$6 = US$72, and with the first year of the domain, US$14, the total is US$72 + US$14 = US$86. (d) A domain name is rented, not bought. She pays to use it for a period and must renew it to keep it. (e) The name cannot be changed after payment, so a spelling slip means paying again for the right name. First she should do a lookup (whois) to check that the name is free. The prices are invented; always read the real price on the registrar's page.
The bakery site has 12 files: index.html, menu.html, about.html, contact.html, seven pictures and a PDF price list. (a) What five details does the host give for the FTP connection? (b) Why is SFTP better than plain FTP? (c) On the first upload, how many files are copied? (d) Later the owner edits index.html and contact.html and adds one new picture, images/new-cake.jpg. How many files must be uploaded, and how many files are then on the server? (e) How many file transfers have there been in total?
(a) The server address, a username, a password, a port number and the remote folder where public files go. That is 5 details. (b) SFTP is the secure version of FTP. Plain FTP is not secure and many hosts no longer support it. (c) All 12 files are copied into the remote folder. (d) Only the 2 edited pages and the 1 new picture need uploading, so 3 files. The other 10 are unchanged. The server now holds 12 + 1 = 13 files. (e) 12 + 3 = 15 transfers in total. After each upload, open the live site in a browser and test the changed pages. Watch out: if the new picture is uploaded but index.html is not, the page will not show it.
Now let's water it
Session runs notes to flashcards to quiz back-to-back.
Where this comes from
- CSEC Information Technology Syllabus (CXC 30/G/SYLL 08, revised 2000, 2008, 2013) · Caribbean Examinations Council (CXC) · Section 6, Specific Objective 28 · Syllabus scope
- MDN Web Docs: Learn web development (various pages) · Mozilla and MDN contributors · Page publishing-your-website, MDN Publishing your website, checked against (https://developer.mozilla.org/en-US/docs/Learn_web_development/Getting_started/Your_first_website/Publishing_your_website) · Facts
- MDN Web Docs: Learn web development (various pages) · Mozilla and MDN contributors · Page what-is-a-domain-name, MDN What is a domain name?, checked against (https://developer.mozilla.org/en-US/docs/Learn_web_development/Howto/Web_mechanics/What_is_a_domain_name) · Facts
- MDN Web Docs: Learn web development (various pages) · Mozilla and MDN contributors · Page upload-files-to-a-web-server, MDN How do you upload your files to a web server?, checked against (https://developer.mozilla.org/en-US/docs/Learn_web_development/Howto/Tools_and_setup/Upload_files_to_a_web_server) · Facts