Share this Page URL

Chapter 5. Making the Jump to Hyperspace... > The URL of Net: A Cyberspace Address... - Pg. 53

Making the Jump to Hyperspace: Adding Links 53 · How--The first part of the URL specifies how the data is going to be transferred across Net lines. This is called the protocol and, luckily, mere mortals like you and I don't need to concern our- selves with the guts of this stuff. All you need to know is which protocol each resource uses, which is easy. For example, the World Wide Web uses something called HTTP (I tell you which protocols other resources use later in this chapter). So, the "how" part of the URL is the protocol, followed by a colon (:) and two slashes (//). (I told you this stuff was arcane; it makes alchemy look like The Cat in the Hat. ) So, a web page URL always starts like this (lowercase letters are the norm, but they're not necessary): http://. · Who--Calling the next part the "who" of the URL is, I admit, a bit of a misnomer because there's no person involved. Instead, it's the name of the computer where the resource is located--in geek circles, this is called the host name . (This is the part of an Internet address that has all those dots you're always hearing, such as ncsa. or For example, this book's home page is located on a computer named You just tack this "who" part onto the end of the "how" part, as shown here: · Where--The next part of the address specifies where the resource is located on the computer. This generally means the directory in which the resource is stored; the directory might be some- thing like /pages or /pub/junk/software. This book's home page is in its own directory, which is /creatingawebpage/. (To get your own directory, you need to sign up with a company that puts pages on the Web; see Chapter 7, "The Host with the Most: Choosing a Web Hosting Provider," for details.) So now you just staple the directory onto the URL and then add another slash on the end, for good measure: · What--Almost there. The "what" part is just the name of the file you want to see. For a web page, you use the name of the document that contains the HTML codes and text. The file containing this book's home page is called index.html, so here's the full URL: creatingawebpage/index.html. Page Pitfalls I mentioned earlier that you can use uppercase or lowercase letters (the latter are normally used) for the "how" part of the URL. The same is true for the "who" part, but case is often crucial when entering the directory and filename. With most (but not all) websites, if you enter even a single letter of a directory or filename in the wrong case, you may not get to where you want to go. (Technical aside: Web servers that run the Unix operating system are finicky about case, while those that run Windows are not.) That's why I always tell people to use nothing but lowercase letters for directory and filenames; it just keeps things simpler (and saves wear and tear on your typing fingers by not having to stretch over to the Shift key). Okay Mr. Smartypants writer, lemme ask you this: I visit your website all the time, but to get there, I only have to enter How come I can get away with- out entering a filename? Ah, that's because most web servers have something they call a default filename. This means that if the user doesn't specify a filename, the server just assumes they want the default file. On most servers, the default file is named index.html, so if you enter this: tingawebpage/; what you really get is this: dex.html. When you sign up with a web host, you need to find out what the default filename is and then be sure to use that name for your main page. (Otherwise, your site visitors will just see an ugly list of all the files in your directory or, even worse, an error message.) Got all that? Yeah, I know--it's as clear as mud. Well, have no fear. If you can keep the "how, who, where, and what" idea in your head, it'll all sink in eventually.