ポート 80 — HTTP (TCP)
What is Port 80?
World Wide Web HTTP
This is a well-known port (0–1023) commonly used by core services like HTTP. · RFC 9110, RFC 9112
When do you need Port 80 open?
Open on any public-facing web server. Even if your site runs HTTPS-only, keep port 80 open to serve HTTP redirects to port 443. Close only if the server hosts no web content at all.
Common uses and software
- Apache HTTP Server
- Nginx
- Caddy
- Microsoft IIS
- Cloudflare (edge)
- Let's Encrypt HTTP-01 validation
Security
HTTP sends all data unencrypted. Configure your server to redirect all port 80 traffic to HTTPS (port 443) with a 301 permanent redirect. Never serve login pages, APIs, or user data over plain HTTP. Use HSTS headers to prevent HTTPS downgrade attacks.
Is Port 80 safe?
An open port increases your attack surface. Safety depends on how HTTP is configured.
Keep HTTP up to date with security patches. Require strong authentication and restrict access to the minimum necessary IP addresses.
Test connectivity for Port 80 on any host.
How to Open Port 80
To allow incoming connections to Port 80 (HTTP) from outside your network, configure your firewall and add a port forwarding rule on your router pointing to your device's local IP address.
Open Windows Defender Firewall → Advanced Settings → Inbound Rules → New Rule → Port → TCP → Specific local ports: 80 → Allow the connection → Name and save the rule.
netsh advfirewall firewall add rule name="Open Port 80" dir=in action=allow protocol=tcp localport=80sudo ufw allow 80/tcpsudo iptables -A INPUT -p tcp --dport 80 -j ACCEPTLog into your router (192.168.1.1 or 192.168.0.1) → Port Forwarding → Add a new rule: Protocol TCP, External port 80, Internal IP: your device's local IP, Internal port 80 → Save.
How to close Port 80
If you do not need HTTP, block this port in your firewall or router.
To block port 80 on Windows, run the following command in PowerShell or Command Prompt (as Administrator):
netsh advfirewall firewall add rule name="Block Port 80" dir=in action=block protocol=tcp localport=80sudo ufw deny 80/tcpsudo iptables -A INPUT -p tcp --dport 80 -j DROPRemove or disable any port forwarding rule for Port 80.
Frequently Asked Questions
What is Port 80 used for?▾
Port 80 is the default TCP port for HTTP. It is used by servers and applications that need to accept incoming connections for this service. Whether you need it open depends on whether you are actively running a HTTP server — if not, it should remain closed to reduce your attack surface.
Is Port 80 safe to keep open?▾
An open Port 80 increases your attack surface. If you are not actively running HTTP, close this port in your firewall and remove any port forwarding rules. If HTTP must be accessible, restrict access to known IP ranges, keep the service software updated with security patches, and use strong authentication.