HTML Uniform Resource Locators
A URL is another word for a web address. A URL can be made of words (like PromptCookbook.com) or an Internet Protocol (IP) address (like 192.68.20.50). Most people use the name when surfing, because names are easier to remember than numbers.
URL - Uniform Resource Locator
Web browsers request pages from servers using a URL, which addresses a document or other data on the web. A web address like https://prompt-cookbook.com follows the form scheme://prefix.domain:port/path/filename. The scheme is the type of service (most often http or https), the prefix is a domain prefix (default for http is www), the domain is the domain name (like PromptCookbook.com), the port is the port number on the host (default for http is 80), the path is a path on the server (the root directory if left out), and the filename is the name of the document.
Common URL Schemes
Some common schemes: http (HyperText Transfer Protocol) for ordinary web pages, not encrypted; https (Secure HTTP) for secure, encrypted web pages; ftp (File Transfer Protocol) for downloading or uploading files; and file for a file on your own computer.
URL Encoding
URLs can only be sent over the Internet using the ASCII character set. If a URL has characters outside ASCII, it must be converted. URL encoding replaces a non-ASCII character with a % followed by hexadecimal digits. URLs cannot contain spaces, so a space is normally replaced with a plus (+) sign or %20.
Try It Yourself
PromptCookbook has an interactive demo where you type some input and click Submit. The browser URL-encodes the input before sending it to the server, and a page on the server shows the received value.
ASCII Encoding Examples
The browser encodes input according to the page's character set; the default in HTML5 is UTF-8. The same character encodes differently in different sets. For example, € is %80 in Windows-1252 but %E2%82%AC in UTF-8, and © is %A9 in Windows-1252 but %C2%A9 in UTF-8.