Links and URLs

Magic Submitter

Instant Linkbuilding Solutions

Get Instant Access

Like the pages of real books, Web pages contain text and graphics. Unlike real books, however, Web pages can include multimedia, such as video clips, sound, and links to other Web pages that can actually take you to those Web pages.

The links in a Web page are references to other Web pages that you can follow to go from one page to another. The Web browser typically displays these links as underlined text (in a different color) or as images. Each link is like an instruction to you — something like, "For more information, please consult Chapter 4," that you might find in a real book. In a Web page, all you have to do is click the link; the Web browser brings up the referenced page, even though that document may actually reside on a far-away computer somewhere on the Internet.

The links in a Web page are referred to as hypertext links because when you click a link, the Web browser jumps to the Web page referenced by that link.

This arrangement brings up a question. In a real book, you might ask the reader to go to a specific chapter or page in the book. How does a hypertext link indicate the location of the referenced Web page? In the World Wide Web, each Web page has a special name, called a Uniform Resource Locator (URL). A URL uniquely specifies the location of a file on a computer. Figure 2-2 shows the parts of a URL.

Figure 2-2:

The parts of a Uniform Resource Locator (URL).

Port

Domain name w

Directory path

Filename A.

HTML anchor

http://www.tldp.org:80/HOWTO/Wireless-HOWTO-2.html#ss2.1

Protocol

As Figure 2-2 shows, a URL has the following parts:

♦ Protocol: Name of the protocol that the Web browser uses to access the data from the file the URL specifies. In Figure 2-2, the protocol is http://, which means that the URL specifies the location of a Web page. Here are some of the common protocol types and their meanings:

• file:// means the URL is pointing to a local file. You can use this URL to view HTML files without having to connect to the Internet. For example, file:///var/www/html/index.html opens the file /var/www/html/index.html from your Fedora Core system.

• ftp:// means you can download a file using the File Transfer Protocol (FTP). For example,

ftp://ftp.purdue.edu/pub/uns/NASA/nasa.jpg refers to the image file nasa.jpg from the /pub/uns/NASA directory of the FTP server ftp.purdue.edu. If you want to access a specific user account via FTP, use a URL in the following form:

ftp://username:[email protected]/

with the username and password embedded in the URL (note that the password is in plain text and not secure).

• http:// means the file is downloaded using the HyperText Transfer Protocol (HTTP). This protocol is the well-known format of URLs for all Web sites, such as http://fedora.redhat.com for the Fedora Project's home page. If the URL does not have a filename, the Web server sends a default HTML file named i ndex.html (that's the default filename for the popular UNIX-based Apache Web servers; Microsoft Windows Web servers use a different default filename).

• https:// specifies that the file is accessed through a Secure Sockets Layer (SSL) connection — a protocol designed by Netscape Communications for encrypted data transfers across the Internet. This form of URL is typically used when the Web browser sends sensitive information (such as credit card number, username, and password) to a Web server. For example, a URL such as

https://some.site.com/secure/takeorder.html

may display an HTML form that requests credit card information and other personal information (such as name, address, and phone number).

• mailto:// specifies an e-mail address you can use to send an e-mail message. This URL opens your e-mail program from where you can send the message. For example, mailto:[email protected]. com refers to the Webmaster at the host someplace.com.

• news:// specifies a newsgroup you can read by means of the Network News Transfer Protocol (NNTP). For example,

news://news.md.comcast.giganews.com/comp.os.linux.setup

accesses the comp.os.linux.setup newsgroup at the news server news.md.comcast.giganews.com. If you have a default news server configured for the Web browser, you can omit the news server's name and use the URL news: comp.os.linux.setup to access the newsgroup.

♦ Domain name: Contains the fully qualified domain name of the computer that has the file this URL specifies. You can also provide an IP address in this field. The domain name is not case sensitive.

♦ Port: Port number that is being used by the protocol listed in the first part of the URL. This part of the URL is optional; all protocols have default ports. The default port for HTTP, for example, is 80. If a site configures the Web server to listen to a different port, the URL has to include the port number.

♦ Directory path: Directory path of the file being referred to in the URL. For Web pages, this field is the directory path of the HTML file. The directory path is case sensitive.

♦ Filename: Name of the file. For Web pages, the filename typically ends with .htm or .html. If you omit the filename, the Web server returns a default file (often named index.html). The filename is case sensitive.

♦ HTML anchor: Optional part of the URL that makes the Web browser jump to a specific location in the file. If this part starts with a question mark (?) instead of a hash mark (#), the browser takes the text following the question mark to be a query. The Web server returns information based on such queries.

Was this article helpful?

0 0
100 Backlinking Strategies

100 Backlinking Strategies

This ebook will give you 100 backlinking strategies. Backlinks can increase your traffic, sales and search engine ranking. You'll discover many different types of backlinks you could get and tactics you could use to acquire those those backlinks from other high PR web sites.

Get My Free Ebook


Post a comment