How does a web browser know the destination port to connect to reach a web server?
Try an answer before revealing the guidance below.
Key Concepts
- URL scheme
- Explicit port
- Default port
- HTTP
- HTTPS
Answer Approach
- Check whether the URL supplies a port.
- Otherwise use the scheme’s conventional default.
- Name the default port numbers.
Full Answer
Answer status: Draft answer (unofficial). Revision notes, not an official marking scheme.
The browser uses the port written explicitly in the URL if one is present. Otherwise, it uses the default port for the URL scheme, normally 80 for HTTP and 443 for HTTPS.
Shortcuts: K concepts · A approach · F answer · R reviewed · B bookmark · ← / → previous / next