answersLogoWhite

0


Best Answer

There really are more than three parts to a URL. Several are optional or even relatively obscure.

  1. The protocol. Usually, this is "http", followed by "://", though it can be "https", "ftp", or other things.
  2. The hostname. This is usually everything after "://" but before the next "/", if there is one. A hostname like "www.example.com" can be further broken down into the top-level domain ("com"), the domain name ("example.com"), and the subdomain ("www"). Not every subdomain in a URL has to be "www". This denotes the Web site.
  3. Occasionally there will be a port number (like ":80") after the hostname, but before any "/". If there is one, it'll usually be ":80", but it can be something else. Obviously, this is optional.
  4. The path is anything that appears after the "/" after the hostname, but before a possible "?". An example would be "games/images/display.HTML". The path is optional, too, or it can be quite long. It can have a filename ("display.HTML" in the previous example), or just be one or more directories ("games/images/" in that example). This denotes what file to display at that site.
  5. The query string, or parameters. These appear after a "?" and before a possible "#". They consist of parameter/value pairs. The pairs are separated by "&"s, and the parameters and values are separated by "="s. So if you had "?foo=1&bar=2", that would mean "foo" was set to 1 and "bar" was set to 2. These are optional, and there can be many of them. These pass information to the page being displayed.
  6. Finally, there is the fragment or named anchor. This is anything that comes after a "#". It usually refers to a section in the document to be scrolled to.
User Avatar

Wiki User

∙ 2011-09-13 21:26:25
This answer is:
User Avatar
Study guides
More answers
User Avatar

Wiki User

∙ 2014-11-18 17:25:23

http : Protocol used in the communication between the browser and the web server.
: : Colon simply separates the protocol from the other part of the web address.
// : Indicates that a contact to a server is to be achieved.

This answer is:
User Avatar

User Avatar

Wiki User

∙ 2014-02-27 21:19:04

A URL technically has five parts: the protocol, the domain name, the path, the directory and the file name. Consider the URL http://coolexample.com/funky/music.html. The protocol is http://, the domain name is coolexample.com, the path is /funky/music.html, the directory is /funky/ and the file name is /music.html.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What are the three parts of a URL?
Write your answer...
Submit
Still have questions?
magnify glass
imp
People also asked

What is the word that goes with a public officer of a town or township responsible for keeping the peace?

View results

Is Matthew Underwood related to Carrie Underwood?

View results