URL anatomy

https://user:pass@example.com:8080/path/segment?key=value&k2=v2#fragment
└────┘   └───────┘ └──────────┘ └──┘└──────────┘ └────────────┘└───────┘
scheme   userinfo    host       port  pathname       search       hash

Per RFC 3986, the scheme is followed by : and (for hierarchical URLs) //. The authority section can contain userinfo (deprecated for security reasons), a host, and an optional port. The pathname starts with the first / after the authority. ? introduces the query, # introduces the fragment.