SoftwareTestPilot
API TestingPublished: 8 min read

Default Port for HTTPS: Port 443 Explained for Testers

The default port for HTTPS is 443 (HTTP uses 80). Learn when the port is hidden, how to test non-default ports, and how to debug port and TLS errors.

SoftwareTestPilot
QA Editorial Team
Share:XLinkedInWhatsApp
Default Port for HTTPS: Port 443 Explained for Testers: API Testing article cover, SoftwareTestPilot.com
Default Port for HTTPS: Port 443 Explained for Testers: API Testing article cover, SoftwareTestPilot.com

Short answer

The default port for HTTPS is 443. RFC 9110 defines it: when an https:// URL has no port, the client connects to TCP port 443. Plain HTTP uses port 80. Both numbers are registered with IANA.

So https://www.softwaretestpilot.com/ and https://www.softwaretestpilot.com:443/ point to exactly the same place. The port is only hidden, not missing.

What a port is, in one paragraph

An IP address finds the machine; a port finds the program on that machine. One server can run a web server on 443, a database on 5432 and an SSH service on 22 at the same time. The number after the colon in a URL (host:8443) tells the client which program to talk to. When you leave it out, the scheme (http or https) decides the default.

Common ports testers meet

PortUsually used forWritten in URL?
443HTTPS (and HTTP/3 over UDP)No, it is the default for https://
80Plain HTTP, often only to redirect to HTTPSNo, it is the default for http://
8443HTTPS on a second service or admin consoleYes
8080HTTP on app servers and proxiesYes
3000 / 5173 / 8080Local dev serversYes

Only 443 and 80 are true standards here. The others are common habits, not rules, so always check the environment's own documentation.

See the port yourself with curl

These commands were run on 6 Nov 2026 against this site. Your timings and headers will differ.

# 1. HTTPS with no port: curl uses 443
curl -sv https://www.softwaretestpilot.com/ -o /dev/null
# response line: < HTTP/2 200

# 2. The same URL with :443 written out gives the same result
curl -sv https://www.softwaretestpilot.com:443/ -o /dev/null
# response line: < HTTP/2 200

# 3. Plain HTTP goes to port 80 and is redirected
curl -sI http://www.softwaretestpilot.com/
# HTTP/1.1 301 Moved Permanently

Run with -v and look for the "Connected to ... port 443" line to confirm which port was used. The redirect in step 3 is the behaviour you want: visitors who type http:// are sent to the secure version.

Port-related test cases for any web app or API

  1. HTTP redirects to HTTPS. http://host/path returns 301 or 308 to https://host/path with the path and query kept.
  2. Explicit :443 works. https://host:443/ gives the same response as https://host/.
  3. No mixed content. The HTTPS page loads no scripts or images over http:// (check the browser console).
  4. Wrong port fails cleanly. http://host:443/ should not return private data; expect an error or a 400 response.
  5. Non-default ports are closed if unused. A production host should not expose dev ports like 8080 or 3000 to the internet.
  6. Links and redirects keep the right port. On a staging server at :8443, login redirects must not drop the port and send you to 443.
  7. Certificate is valid on that port. The certificate matches the host name and is not expired.

Troubleshooting port and HTTPS errors

SymptomLikely causeWhat to check
Connection refusedNothing is listening on that portIs the service running? Is the port in the URL right?
Request hangs, then times outA firewall or security group drops the portTry from another network; ask for the port to be opened
"wrong version number" / SSL errorSending HTTPS to a plain HTTP portUse http:// or the correct HTTPS port
Garbled response or 400 "plain HTTP sent to HTTPS port"Sending HTTP to port 443Change the scheme to https://
Certificate warningSelf-signed, expired or wrong-host certificateInspect the certificate in the browser; do not just click past it

Interview answer

Q: What is the default port for HTTPS?

Sample answer: "443. HTTP uses 80. If an https URL has no port, the client connects to 443, so the browser hides it. Anything else, like 8443 on a staging server, has to be written in the URL. As a tester I also check that port 80 redirects to HTTPS and that no dev ports are left open in production."

Likely follow-ups: What does HTTPS add on top of HTTP? (TLS encryption and server identity.) Does HTTP/3 use 443? (Yes, but over UDP; see RFC 9114.) What happens if you send HTTP to 443? (The TLS handshake fails or the server returns an error.)

Practice exercise

Pick any public HTTPS site. Using curl or your browser's Network tab, find: (1) which port was used, (2) whether http:// redirects, and (3) which status code the redirect uses.

Answer check: the port should be 443, and the redirect should be 301 or 308 pointing to the https:// address with the same path.

Next step

Ports are the first step of every request. Next, learn what the response codes mean in 401 vs 403 for unauthorized requests, run eight hands-on checks in how to test a REST API online, or try requests yourself in the API Playground. Questions? Ask in the QA Community.

Key takeaways

  1. 1HTTPS defaults to TCP port 443; HTTP defaults to port 80.
  2. 2When the port is the default, it is left out of the URL and browsers hide it.
  3. 3Non-default ports (8443, 8080, 3000) must always be written in the URL.
  4. 4HTTP/3 also uses port 443, but over UDP instead of TCP.
  5. 5Port and protocol must match: sending plain HTTP to 443 or HTTPS to 80 fails.

Common mistakes to avoid

  • Writing https://host:80 or http://host:443 and reading the failure as a server bug.
  • Assuming a staging server uses 443 when it actually listens on 8443.
  • Testing only the https:// URL and never checking that http:// redirects to it.
  • Blaming the app for a timeout that is really a firewall blocking the port.
  • Turning off certificate checks in tests and missing a real certificate problem.

References

  1. 1
  2. 2
  3. 3
    RFC 9114: HTTP/3— rfc-editor.org
  4. 4
    MDN: What is a URL?— developer.mozilla.org