localhost:80: The Default Web Port and Its Conflicts
Typing localhost:80 is the same as typing plain localhost, because 80 is the default port for HTTP. Apache, Nginx, IIS and XAMPP listen there. If the page fails, either no web server is running or Windows services such as IIS or HTTP.sys already hold 80 and stop Apache from starting.
| Program | Platform | How to stop or move it |
|---|---|---|
| IIS / World Wide Web Publishing Service | Windows | Stop the W3SVC service or remove the binding |
| HTTP.sys (System, PID 4) | Windows | net stop http after stopping dependent services |
| Apache from XAMPP or MAMP | All | Listen 8080 in httpd.conf |
| Nginx | Linux and Mac | listen 8080; in the server block |
| Docker container with -p 80:80 | All | docker ps, then stop the container |
Updated
Port 80 is special in two ways. Browsers hide it, so http://localhost and http://localhost:80 are identical. And on Mac and Linux, ports below 1024 need root, so a server started without sudo cannot bind to it at all.
Find who owns port 80
Check the port on each system
Run the Windows lines in an administrator prompt so service names appear.
# Mac or Linux
sudo lsof -i :80
# Windows
netstat -ano | findstr :80
tasklist /FI "PID eq <PID>"
net stop W3SVC
Freeing port 80 on Windows
Run netstat -ano | findstr :80 in an admin prompt. A real process ID points to a program you can close; PID 4 means a service is using the HTTP driver. In Services, stop World Wide Web Publishing Service and set it to Manual if you do not use IIS.
If you would rather not fight Windows for the port, keep Apache on 8080. Nothing in local development requires port 80.
Running Apache yourself is optional for a small business site; We.Inc hosts the pages so no local web server is involved.
How it works
- Open http://localhost and see whether any page, even an error, appears.
- Check which process owns port 80 with netstat or lsof.
- Stop the conflicting service, or move your own server to 8080.
- Restart Apache or Nginx and watch its error log for a bind failure.
Tips
- On Windows, netstat showing PID 4 means the kernel HTTP driver holds 80 on behalf of IIS, SQL Server Reporting Services or another service.
- Older Skype builds grabbed 80 and 443 as fallback ports, so very old installs can still block Apache.
- XAMPP's control panel shows a red port 80 warning naming the blocking process, which is quicker than reading Apache's error log.
- On Linux, giving a binary the cap_net_bind_service capability lets it use port 80 without running as root.
Frequently asked questions
Is localhost:80 the same as localhost?
Yes for HTTP. When a URL has no port, the browser uses 80 for http and 443 for https, so both addresses reach the same server.
Why can't Apache start on port 80 in XAMPP?
Another program owns the port, most often IIS or a Windows service using HTTP.sys. Stop it, or change Listen 80 to Listen 8080 in httpd.conf and open localhost:8080.
What is localhost:80000?
It is not a valid address. TCP ports stop at 65535, so 80000 cannot exist and the browser will reject it. You most likely meant localhost:8000, used by Django, Laravel and Python's file server.
Why do I need sudo for port 80 on Mac or Linux?
Ports under 1024 are privileged on Unix systems. Run the server with sudo, use a reverse proxy, or develop on a high port like 8080 instead.
Related: localhost:8080, localhost:8000, What is localhost, Apache vs Nginx.
Start for free or see all free tools. We.Inc is free to start, with no card needed. AI building is on paid plans from $20 a month.
More in Guides
- localhost:8000: Django, Laravel, FastAPI and Python Servers
- localhost:8080: What Runs on It and How to Fix It
- localhost:8081: What Listens There and How to Fix It
- localhost:8088: Superset, YARN or Splunk
- localhost:8090: Confluence and Other Port 8090 Servers
- localhost:8096: Opening Jellyfin's Web Interface
- localhost:8443: HTTPS on a Local Port
- localhost:8501: Running a Streamlit App
Product
Who It's For
- For Agencies
- For Freelancers
- For Hosting Providers
- For SaaS Platforms
- For Startups
- For Financial Services
- For Healthcare
Features
Resources
- Blog
- Help Center
- Free Business Tools
- Free UI Components
- Website Templates
- Template Collections
- Website Examples
- Guides
- Comparisons
- Alternatives
- Best Lists
- Reviews
- Pricing Guides
- Use Cases
- Glossary & Guides
- Integrations
- Developers
- Benchmark
- Windows App