Go to the first, previous, next, last section, table of contents.


4 URL Conventions

URL is an acronym for Uniform Resource Locator. Wget recognizes the URL syntax as per RFC1738. This is the most widely used form (square brackets denote optional parts):

http://host[:port]/path
ftp://host[:port]/path

You can also encode your username and password within a URL:

ftp://user:password@host/path
http://user:password@host/path

Either `user' or `password', or both may be left out (e.g. `ftp://user@host' is valid). If you do not specify either the HTTP username or password, they will be ignored. If you leave out FTP username, `anonymous' will be used. If you leave out FTP password, your email address will be used for password.

You can encode the non-printing character in any URL by coding it as `%xy', where `x' and `y' are hexadecimal digits. Of course, you must quote the `%' itself with `%25'. You can encode `:' and `@' in passwords with `%3A' and `%40' respectively.

Two alternative variants are also supported, because of historical (hysterical?) reasons and their wide-spreadedness.

FTP-only syntax (supported by NcFTP):

host:/dir/file

HTTP-only syntax (supported by Netscape and Lynx):

host[:port]/dir/file

These two alternative forms are deprecated, and may cease being supported in the future.

If you do not understand the difference between these notations, or do not know which one to use, just use the plain ordinary format you use with your favourite browser, like Lynx or Netscape.


Go to the first, previous, next, last section, table of contents.