Web Design |
URLs |
||||
main menushelp pagesprinter-friendly/text-only version |
URL is an abbreviation for Universal Resource Locator. It is the "address" of a web page, and usually looks something like this (this being the URL of the page you're looking at right now): http://personalpages.manchester.ac.uk/staff/andrew.whitworth/webdesign/subj_url.html It's worth "deconstructing" this seemingly random string of characters. As you will eventually be publishing your web site "for real", you'll need to know not only what your site's URL is but why it is what it is. This topic is covered in more detail in chapter 6 of the printed course booklet, where I also discuss the ways you can get a more "user-friendly" and/or memorable URL, and how to market and distribute your URL. However, some brief points are worth making here. http://: This abbreviation stands for "HyperText Transfer Protocol". Technically it's still possible to see other prefixes here like "ftp://" but this is very rare and when you do, in any case, you are no longer strictly using the WWW (although you're still using the Internet). Although this is near-universal, the prefix is still part of the URL. In web browsing you can sometimes do without it, but web designers always need to remember that it is there. personalpages.manchester.ac.uk: This is the domain name. It represents a particular server on which the web page can be found; more simply, it is the name of the computer on which the HTML file is stored. In this case, the server is obviously belongs to Manchester University, but it is a different server from www.manchester.ac.uk. /staff/andrew.whitworth/webdesign/: Sometimes, a domain name is all you need. But larger sites are usually split into sections, using folders. What we have here are two further "levels" of the folder hierarchy on http://personalpages.manchester.ac.uk/: first a subdivision staff (as opposed to, say, student), then my own personal web space, then a subfolder of that space called webdesign. When you publish your site you can set folders like this up on the server. If you want some practice at this, keep reading. subj_url.html: The final part of the URL is, simply, the name of the HTML file. That is why it always ends in .html (or .htm). However, remember what was said on the naming page about the index.html file. All front pages should be given this name, as it precludes the need for a filename at the end of the URL, which makes it easier to remember. If you're still confused, think about how similar this is to "real-world" addresses. These are made up of various parts which help specify an address with increasing precision, although when writing out addresses, we tend to write them with the more specific bits first: in other words we may go "house number - street name - district - town or city - county". (The postcode is an exception, but don't worry about that - it's just an analogy.) With web addresses it's the other way round, but the general principle is the same: the domain name is the general area of the page, and subfolders and file names then pinpoint it precisely. The WWW directory
ISS, The nice people who run the computer network at Leeds Uni, have made it easy for you to publish pages on the Web for real. What you need to do is create a folder on your M: drive called WWW. WWW must be in capital or upper-case letters for this to work./ If you save your web pages in this folder they will get the following URL: http://www.personal.leeds.ac.uk/~[your username]/[the filename.ext] For example, if a student with the username dep2abc saves a file called myfile.html in their WWW directory, the URL of that file would be: http://www.personal.leeds.ac.uk/~dep2abc/myfile.html Do note the tilde (~) - the wiggle that the Spanish sometimes put on top of their Ns - this is a necessary part of the URL in this case. It can usually be found on the extreme right of the middle row of the keyboard, above the hashmark (#), which also has application in HTML. Note also that if you have an index.html file in this directory, you won't need the final filename; your URL will end after "dep2abc/" (or whatever your username is). The lecture started you off with the use of this folder, so hopefully by now you have begun to use it at a basic level. Let's create a subfolder within this folder, however. Repeat what you did in the lecture, only now one level further down: instead of creating "WWW" on the top level of your M: drive, go into "WWW" and create another folder, called "sub". Now, if you had saved myfile.html within "sub", its URL would be (and compare this to the one just above): http://www.personal.leeds.ac.uk/~dep2abc/sub/myfile.html You may never use subfolders, particularly if you're only writing small sites. But it helps to know that they are there, and they are an important element in why URLs look like they do. |
Material on this site is © Drew Whitworth, 2005 Permission will usually be given to reproduce material from this site for non-commercial purposes, if credit is given. For enquiries, e-mail Drew at andrew [dot] whitworth [at] manchester [dot] ac [dot] uk.