I always got confused about what certain parts of an URL are called, so here is a simple diagram that should help. Some parts are not 100% specified, so there can be slight variations of what people call them.
Common URL
https://www.example.com/products/computers.php?type=laptop#return-policy
Parts of the URL
Part | Name | |||
---|---|---|---|---|
https:// | URL | origin | protocol, scheme | |
www | domain, hostname | subdomain | ||
example | second level domain | |||
com | top level domain | |||
products/ | path name | directory | ||
computers.php | file, page | |||
?type=laptop | query string, parameters, search | |||
#return-policy | fragment, hash |