What is Port number?

A number from 0 to 65535 used by TCP and UDP to identify which application on a host the traffic is for. Ports 0–1023, such as 80 for HTTP, 443 for HTTPS and 53 for DNS, are called well-known ports.

Japanese name: ポート番号

Port number appears in 3 practice questions across 2 topics, including Web Technology Basics, Computer Networking Basics.

Field: Computer Networking Basics

Try it: questions about Port number

Which correctly pairs protocols with the standard port numbers their servers use?

  1. AHTTP 80, HTTPS 443, DNS 53
  2. BHTTP 8080, HTTPS 443, DNS 25
  3. CHTTP 80, HTTPS 22, DNS 53
Show answer and explanation

Answer: A. HTTP 80, HTTPS 443, DNS 53

A port number is a 16-bit number from 0 to 65535 that identifies which application on a host, reached by IP address, the traffic is for. Ports 0–1023 are called well-known ports and are assigned to major services. Typical ones are HTTP 80, HTTPS 443, DNS 53, SSH 22 and SMTP (mail transfer) 25. The client side uses a number chosen by the OS each time (an ephemeral port) as its source port. Services can run on non-standard numbers; 8080 is often used for web development or proxy servers, but then the connecting side has to specify the number.

A browser opens https://www.example.com:8443/docs/guide.html?lang=ja#install. Which part of this URL is not included in the request sent to the server and is used only inside the browser after the page loads?

  1. A:8443
  2. B?lang=ja
  3. C#install
Show answer and explanation

Answer: C. #install

This URL consists of the scheme (https), the host name (www.example.com), the port number (8443; if omitted, 443 for https), the path (/docs/guide.html), the query (lang=ja) and the fragment (install). The browser uses the port number to decide where to connect and sends the path and query to the server in the request, but it does not send the fragment after #. The fragment is used only inside the browser, for example to move to the position of the element with id="install" in the page.

Port number in the explanations

Questions that mention Port number (3)

  1. Which correctly pairs protocols with the standard port numbers their servers use?
  2. A browser opens https://www.example.com:8443/docs/guide.html?lang=ja#install. Which part of this URL is not included in the request sent to the server and is used only inside the browser after the page loads?
  3. Under the browser's same-origin policy, which of the following URLs is considered to have the same origin as https://www.example.com/app/index.html?

Books on Computer Networking Basics Ad

As an Amazon Associate I earn from qualifying purchases.

Related terms

HTTP (Hypertext Transfer Protocol) DNS (Domain Name System) SSH Same-origin policy ARP CIDR CSMA/CA Default gateway DHCP MAC address

Back to the glossary