Network & delivery
9 min readUpdatedPort 443: the HTTPS port, HTTP/3 on UDP 443, and how to test and firewall it
Quick answer
HTTPS uses TCP port 443, the port IANA registers as "https" and the default for every https:// URL that names no port. HTTP/3 runs over QUIC on UDP, normally on port 443 too, so a current web server listens on TCP and UDP 443 and keeps TCP 80 only to redirect to HTTPS. TLS works on any port, such as 8443, but the number must then appear in the URL. Port 443 open to the world is normal for a public site; an origin behind a reverse proxy should accept it only from the proxy.
01What is port 443?
Port 443 is the well-known port for HTTPS: HTTP sent inside a TLS connection. IANA's registry lists it as https, "http protocol over TLS/SSL", on TCP and UDP (and SCTP, which web traffic does not use).
RFC 9110 sets the rule browsers follow: if an https:// URL has no port, "TCP port 443 (the reserved port for HTTP over TLS) is the default", and for http:// URLs it is TCP 80. So https://example.com/ and https://example.com:443/ are the same address.
| Property | Value |
|---|---|
| IANA service name | https, "http protocol over TLS/SSL" |
| Transport | TCP for HTTP/1.1 and HTTP/2; UDP for HTTP/3 over QUIC |
| Encryption | TLS 1.2 or 1.3 on TCP (1.0 and 1.1 are deprecated); QUIC always uses TLS 1.3 |
| Default for | https:// URLs that name no port (RFC 9110) |
| Plain-text counterpart | TCP 80, the default for http:// URLs |
| Typical servers | nginx, Apache httpd, Caddy, HAProxy, Microsoft IIS, load balancers, CDN edges |
| Common alternative | 8443 (IANA name pcsync-https), the HTTPS port in Apache Tomcat's documentation |
| Face the internet? | Yes for a public site; behind a reverse proxy, only towards the proxy |
02Why does HTTPS have its own port?
A server must know from the first bytes which protocol a client speaks. RFC 2818 (May 2000) explains the split: an HTTP server expects a request line, a TLS server expects a ClientHello, so "common practice has been to run HTTP/TLS over a separate port", and over TCP "the default port is 443". That is why plain HTTP sent to port 443, or TLS sent to port 80, fails at once.
One port still serves many sites and versions: Server Name Indication (SNI, RFC 6066) puts the host name into the ClientHello so the server can pick the right certificate, and ALPN (RFC 7301) agrees on h2 or http/1.1 inside the handshake.
03Port 80 vs 443: keep 80 open only for the redirect
Old links, bookmarks and http:// URLs still arrive on port 80, so a public site keeps it open, above all for a permanent redirect to the same path on https://. RFC 6797, the HSTS standard, says an HSTS host that receives a request over a non-secure transport SHOULD answer with a permanent redirect such as 301, and browsers MUST ignore a Strict-Transport-Security header received over plain HTTP, so send it on the port 443 responses (see HTTP security headers).
RFC 9110 lets a client turn a POST into a GET after a 301; 308 keeps the method, which matters for API clients. In the test of the configuration below, the redirect kept path and query string. Without the ssl_protocols line, nginx 1.22.1 negotiated only TLS 1.2 with an OpenSSL 3.0 client; TLS 1.3 is in the default from nginx 1.23.4.
Port 80 also serves certificate issuance: the ACME HTTP-01 challenge (RFC 8555) is sent to TCP 80, while TLS-ALPN-01 (RFC 8737) uses TCP 443. Close port 80 completely and you need TLS-ALPN-01 or DNS-01. Redirect loops between the ports, usually behind a proxy, are covered in ERR_TOO_MANY_REDIRECTS.
| Port 80 | Port 443 | |
|---|---|---|
| URL scheme | http:// | https:// |
| RFC 9110 calls it | "the reserved port for WWW services" | "the reserved port for HTTP over TLS" |
| Encryption | None | TLS, tied to a certificate for the site's name |
| Job on a public site | Permanent redirect to https:// | Serves the site and sends HSTS |
| ACME validation | HTTP-01 | TLS-ALPN-01 |
server {
listen 80;
listen [::]:80;
server_name example.com www.example.com;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name example.com www.example.com;
ssl_certificate /etc/ssl/example.com/fullchain.pem;
ssl_certificate_key /etc/ssl/example.com/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3;
# HTTP/2: "http2 on;" from nginx 1.25.1; older versions add http2 to the listen lines
}
$ curl -sI 'http://example.com/some/path?q=1'
HTTP/1.1 301 Moved Permanently
Server: nginx/1.22.1
Location: https://example.com/some/path?q=104HTTP/3: why port 443 is UDP too
HTTP/3 (RFC 9114, June 2022) does not use TCP. It runs over QUIC (RFC 9000), whose packets "are carried in UDP datagrams", with TLS 1.3 built in (RFC 9001). Servers may offer HTTP/3 on any UDP port; the usual choice is UDP 443 beside TCP 443, and the nginx documentation recommends the same port for both.
Browsers do not try UDP blindly. A server advertises HTTP/3 in the Alt-Svc response header (RFC 7838), for example Alt-Svc: h3=":443"; ma=86400: HTTP/3 on UDP 443 of the same host for the next 86,400 seconds (24 hours is the default without ma). An HTTPS record in DNS with alpn=h3 (RFC 9460) can announce it before the first connection.
If UDP 443 is blocked, RFC 9114 says clients SHOULD fall back to TCP, so closing it costs HTTP/3, not the site. Advertise h3 only when the port is really reachable.
server {
listen 443 quic reuseport; # UDP 443: HTTP/3
listen 443 ssl; # TCP 443: HTTP/1.1 and HTTP/2
server_name example.com;
ssl_certificate /etc/ssl/example.com/fullchain.pem;
ssl_certificate_key /etc/ssl/example.com/privkey.pem;
location / {
add_header Alt-Svc 'h3=":443"; ma=86400';
}
}05HTTPS on port 8443 and other non-standard ports
TLS does not care about the port: RFC 2818 notes it "only presumes a reliable connection-oriented data stream", so https://example.com:8443/ works. On Linux, ports below 1024 need root or the CAP_NET_BIND_SERVICE capability (ip_unprivileged_port_start defaults to 1024), which is why software running as an ordinary user picks high ports; Apache Tomcat's documentation puts its HTTPS connector on 8443. Checked on 13 November 2026 on Debian 12: an unprivileged process got "Permission denied" on 443 and bound a port above 1024.
Browsers refuse the Fetch standard's list of "bad ports", such as 22, 25 and 6000; 443, 8443, 4443 and 8080 are not on it. Whether a high port is a good idea depends on who connects:
- Fine for an origin behind a reverse proxy, where only the proxy uses the port
- Fine for admin panels, internal APIs and staging sites open to known addresses only
- Poor for public sites: every link must carry the port, and networks that let only web ports out block it
- No security gain: scanners find HTTPS on any port, just as moving SSH off port 22 only cuts log noise
06How to check what listens on port 443
On Linux, ss shows listening sockets (-l) for TCP (-t) or UDP (-u), with numeric ports (-n) and the owning process (-p). Run it with sudo: without root, ss lists the sockets but leaves the process column empty for other users' processes.
In the Local Address column, 0.0.0.0:443 and [::]:443 accept connections on every address, while 127.0.0.1:443 accepts them only from the machine itself, which looks like a refused connection from outside. On Windows, Get-NetTCPConnection does the same; its OwningProcess property holds the PID.
A web server that will not start names the reason: nginx reports bind() to 0.0.0.0:443 failed (98: Address already in use) when another program holds the port, and Permission denied (EACCES) means the process lacks the privilege for a port below 1024.
sudo ss -ltnp 'sport = :443'
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
LISTEN 0 511 0.0.0.0:443 0.0.0.0:* users:(("nginx",pid=1234,fd=7))
LISTEN 0 511 [::]:443 [::]:* users:(("nginx",pid=1234,fd=8))
# HTTP/3 listeners are UDP sockets
sudo ss -lunp 'sport = :443'
# Windows PowerShell
Get-NetTCPConnection -LocalPort 443 -State Listen07How to test HTTPS on port 443 with openssl and curl
openssl s_client runs the TLS handshake and reports the result: -connect names host and port, -servername sets the SNI name, -brief prints a summary, and input from /dev/null ends it after the handshake. OpenSSL takes the SNI name from -connect only when that is a host name, so add -servername when you test a server by IP address; without SNI, a server with several sites usually returns its default certificate.
Verification: OK covers the certificate chain, not the name. Add -verify_hostname and -verify_return_error: against wrong.host.badssl.com, a name the certificate does not cover, OpenSSL 3.0 then ended with "hostname mismatch" and "certificate verify failed".
curl -v shows the handshake and the HTTP exchange (* notes, > sent, < received), and --resolve sends the request to one chosen server without changing DNS. curl --http3-only tests UDP 443 because it never falls back, but needs a curl built with HTTP/3; Debian 12's curl 7.88.1 is not.
openssl s_client -connect example.com:443 -servername example.com -brief </dev/null
CONNECTION ESTABLISHED
Protocol version: TLSv1.3
Ciphersuite: TLS_AES_256_GCM_SHA384
Peer certificate: CN = example.com
Hash used: SHA256
Signature type: ECDSA
Verification: OK
Server Temp Key: X25519, 253 bits
# also check the name, and stop on any verification error
openssl s_client -connect example.com:443 -servername example.com \
-verify_hostname example.com -verify_return_error -brief </dev/null
curl -v https://example.com/
* Connected to example.com (192.0.2.10) port 443 (#0)
* ALPN: offers h2,http/1.1
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN: server accepted h2
* subjectAltName: host "example.com" matched cert's "example.com"
* SSL certificate verify ok.
> GET / HTTP/2
< HTTP/2 200
# test one server directly, before or after a DNS change
curl -sv -o /dev/null --resolve example.com:443:203.0.113.10 https://example.com/08Firewall rules for port 443
A public web server needs TCP 80 and 443 open to everyone, plus UDP 443 for HTTP/3. The nftables ruleset below does that with a default-drop input chain, as in the firewall configuration guide, and limits SSH to an admin network. In an isolated test, HTTPS over IPv4 and IPv6 and UDP datagrams over IPv4 reached port 443 from every client address.
| Server role | TCP 80 | TCP 443 | UDP 443 |
|---|---|---|---|
| Public web server, no proxy | Open, for the redirect | Open | Open if HTTP/3 is offered |
| Origin behind a reverse proxy or CDN | Proxy ranges only, or closed | Proxy ranges only | Closed, unless the proxy uses HTTP/3 |
| Internal service or admin panel | Closed | VPN or management network only | Closed |
table inet filter {
chain input {
type filter hook input priority filter; policy drop;
ct state established,related accept
ct state invalid drop
iif "lo" accept
meta l4proto { icmp, ipv6-icmp } accept
tcp dport 22 ip saddr 203.0.113.0/24 accept
tcp dport { 80, 443 } accept
udp dport 443 accept
}
}09The same rules with ufw and iptables
In ufw, a rule without /tcp or /udp covers both, so ufw allow 443 opens TCP and UDP 443 together, and with IPv6 enabled each rule applies to both address families. Plain iptables needs separate ip6tables commands for IPv6; the lines below assume an INPUT chain that already accepts established connections and drops the rest. In the test, the proxy-only rule let the proxy range through and other addresses timed out.
# ufw: public web server
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw allow 443/udp # HTTP/3
# ufw: origin that accepts only a proxy range
sudo ufw allow proto tcp from 198.51.100.0/24 to any port 80,443
# iptables and ip6tables: public web server
sudo iptables -A INPUT -p tcp -m multiport --dports 80,443 -j ACCEPT
sudo iptables -A INPUT -p udp --dport 443 -j ACCEPT
sudo ip6tables -A INPUT -p tcp -m multiport --dports 80,443 -j ACCEPT
sudo ip6tables -A INPUT -p udp --dport 443 -j ACCEPT
# iptables: origin that accepts only a proxy range
sudo iptables -A INPUT -p tcp -m multiport --dports 80,443 -s 198.51.100.0/24 -j ACCEPT10Is it safe to have port 443 open?
For a public site, yes: an open port is only as risky as the software behind it. The exposure is the application, the server and its TLS library, which need patching, and floods the server cannot absorb, such as TLS handshake floods and HTTP floods.
Behind a reverse proxy or CDN, visitors connect to the proxy on 443 and only the proxy connects to the origin. The origin should accept 80 and 443 from the proxy's published ranges and drop everything else. In an isolated test of the ruleset below, clients in the allowed IPv4 and IPv6 ranges got HTTP 200 and all others timed out without a reply. That only helps while the origin address stays private: hiding your origin IP covers the usual leaks.
define PROXY4 = { 198.51.100.0/24 }
define PROXY6 = { 2001:db8:100::/48 }
table inet filter {
chain input {
type filter hook input priority filter; policy drop;
ct state established,related accept
ct state invalid drop
iif "lo" accept
meta l4proto { icmp, ipv6-icmp } accept
tcp dport 22 ip saddr 203.0.113.0/24 accept
tcp dport { 80, 443 } ip saddr $PROXY4 accept
tcp dport { 80, 443 } ip6 saddr $PROXY6 accept
}
}11Port 443 problems: symptoms, causes and fixes
First find the layer that failed. A refused connection or a timeout means TCP to port 443 never opened, a TLS error means the handshake broke, and an HTTP status means TLS worked. The curl messages are as curl 7.88.1 printed them in the test.
| Symptom | Likely cause | Fix |
|---|---|---|
| ERR_CONNECTION_REFUSED; curl: (7) Failed to connect ... Couldn't connect to server | Nothing listens on 443, it listens on 127.0.0.1 only, or a firewall rejects | Check with ss, start the server, allow TCP 443; see this site can't be reached |
| Timeout; curl: (28) ... Timeout was reached | A firewall drops 443, or the origin accepts only its proxy | Open 443 to the right sources |
| ERR_SSL_PROTOCOL_ERROR; curl: (35) ... wrong version number | Plain HTTP behind port 443, such as a port forward to port 80 | Enable TLS on the listener; see ERR_SSL_PROTOCOL_ERROR |
| NET::ERR_CERT_COMMON_NAME_INVALID | The certificate does not cover the name, or a client without SNI got the default one | Fix the certificate or server name; see your connection is not private |
| Redirect loop between http:// and https:// | A proxy talks HTTP to an origin that redirects to HTTPS | See ERR_TOO_MANY_REDIRECTS |
| bind() to 0.0.0.0:443 failed (98: Address already in use) | Another program holds the port | Find it with ss; stop it or move one service |
| Permission denied when the server starts | Unprivileged process on a port below 1024 | Start as root and drop privileges, grant CAP_NET_BIND_SERVICE, or use a high port behind a proxy |
Questions
Frequently asked questions
- 01What port does HTTPS use?
- HTTPS uses TCP port 443 by default, and HTTP/3 uses UDP port 443 over QUIC. IANA registers 443 as https, and RFC 9110 makes it the default for every https:// URL that names no port. HTTPS can run on another port, such as 8443, but the number must then be part of the URL.
- 02Is port 443 TCP or UDP?
- Both. HTTP/1.1 and HTTP/2 run inside TLS on TCP port 443; HTTP/3 runs over QUIC, which uses UDP, normally on port 443 too. A site that offers HTTP/3 needs TCP and UDP 443 open. If UDP is blocked, clients fall back to TCP and the site still works, only without HTTP/3.
- 03Is port 443 the SSL port?
- It is often called that, and IANA still describes 443 as "http protocol over TLS/SSL". SSL itself is obsolete: RFC 7568 (2015) says SSL 3.0 must not be used, and RFC 8996 (2021) deprecated TLS 1.0 and 1.1. Port 443 today carries TLS 1.2 or 1.3.
- 04What is the difference between port 80 and port 443?
- Port 80 carries plain HTTP, which anyone on the path can read and change. Port 443 carries HTTP inside TLS, encrypted and tied to a certificate for the site's name. A public site keeps port 80 only to redirect visitors to https://, and for the ACME HTTP-01 challenge if it renews certificates that way.
- 05Is it safe to have port 443 open?
- For a public website, yes: visitors need it, and an open port is only as risky as the software behind it, so keep the server, TLS library and application patched. If the site sits behind a reverse proxy or CDN, let the origin accept 443 only from the proxy's address ranges, so nobody can go around the proxy.
Sources
Sources and verification
Checked on 13 November 2026 on Debian 12: the nftables ruleset in “Firewall rules for port 443” passes nft -c (nftables 1.0.6); the nftables ruleset in “Is it safe to have port 443 open?” passes nft -c (nftables 1.0.6). Other configuration, commands, log lines and output on this page are examples: adapt them to your system and check them before use.
- 01Service Name and Transport Protocol Port Number Registry · IANA
- 02RFC 9110: HTTP Semantics · IETF
- 03RFC 2818: HTTP Over TLS · IETF
- 04RFC 6066: TLS Extensions (Server Name Indication) · IETF
- 05RFC 7301: TLS Application-Layer Protocol Negotiation Extension · IETF
- 06RFC 9113: HTTP/2 · IETF
- 07RFC 9114: HTTP/3 · IETF
- 08RFC 9000: QUIC, a UDP-Based Multiplexed and Secure Transport · IETF
- 09RFC 9001: Using TLS to Secure QUIC · IETF
- 10RFC 7838: HTTP Alternative Services · IETF
- 11RFC 9460: Service Binding and Parameter Specification via the DNS (SVCB and HTTPS RRs) · IETF
- 12RFC 6797: HTTP Strict Transport Security (HSTS) · IETF
- 13RFC 8555: Automatic Certificate Management Environment (ACME) · IETF
- 14RFC 8737: ACME TLS ALPN Challenge Extension · IETF
- 15RFC 7568: Deprecating Secure Sockets Layer Version 3.0 · IETF
- 16RFC 8996: Deprecating TLS 1.0 and TLS 1.1 · IETF
- 17Fetch Standard: port blocking · WHATWG
- 18Module ngx_http_v3_module · nginx.org
- 19Module ngx_http_v2_module · nginx.org
- 20Module ngx_http_ssl_module (ssl_protocols) · nginx.org
- 21Module ngx_http_rewrite_module (return) · nginx.org
- 22SSL/TLS Configuration How-To (Tomcat 10.1) · Apache Software Foundation
- 23openssl-s_client(1), OpenSSL 3.0 · OpenSSL
- 24curl man page · curl
- 25ss(8) · man7.org
- 26ip(7): privileged ports and bind errors · man7.org
- 27IP sysctl: ip_unprivileged_port_start · Linux kernel documentation
- 28nft(8) manual page · netfilter.org
- 29ufw(8), Ubuntu 24.04 · Ubuntu
- 30Get-NetTCPConnection · Microsoft Learn
Last updated