How it works
A URL such as https://shop.example.com/shoes?colour=red#reviews has several parts: the scheme (https), the host name (shop.example.com), the path (/shoes), a query string of key-value pairs (?colour=red) and an optional fragment (#reviews) that points to a spot on the page. A port number can follow the host, but browsers hide the defaults, 443 for HTTPS and 80 for HTTP.
Characters with a special meaning, such as spaces, question marks and ampersands, must be percent-encoded, so a space becomes %20. The fragment never reaches the server; it stays in the browser. Clean, stable, readable URLs help people and search engines alike, and changing them later needs redirects so that old links keep working.
Related terms
More in How the web works
Names and addresses