Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.



Get Started Now!

How to Find and Free Port 80 in Windows Using CMD

Uncategorized

📄 Here’s an Guide for You:

How to Find and Free Port 80 in Windows Using CMD

In Windows, port 80 is commonly used by web servers like Apache, IIS, or Nginx. If you’re running into port conflicts — for example, when setting up XAMPP — you need to find and free port 80. This guide explains how to check which application is using port 80 and how to stop it.


Step 1 – Check Which Process is Using Port 80

Open Command Prompt (CMD) and run:

netstat -aon | findstr :80

This command lists all processes using port 80, showing something like:

  TCP    127.0.0.1:8001         0.0.0.0:0              LISTENING       48188
  TCP    [::1]:80               [::]:0                 LISTENING       43288
  TCP    [::1]:80               [::1]:56699            TIME_WAIT       0
  TCP    [::1]:80               [::1]:56700            FIN_WAIT_2      43288
  TCP    [::1]:80               [::1]:56704            ESTABLISHED     43288
  TCP    [::1]:56700            [::1]:80               CLOSE_WAIT      29640
  TCP    [::1]:56704            [::1]:80               ESTABLISHED     29640
  TCP    [2401:4900:8835:a2a3:4d84:2033:28cb:3879]:56296  [2404:6800:4009:806::200a]:443  ESTABLISHED     29640
  TCP    [2401:4900:8835:a2a3:4d84:2033:28cb:3879]:56608  [2404:6800:4007:807::2003]:443  ESTABLISHED     29640
  TCP    [2401:4900:8835:a2a3:4d84:2033:28cb:3879]:56609  [2404:6800:4007:807::2003]:443  ESTABLISHED     29640
  TCP    [2401:4900:8835:a2a3:4d84:2033:28cb:3879]:56689  [2404:6800:4007:808::200a]:443  ESTABLISHED     29640
  • LISTENING means the process is actively using port 80.
  • 43288 is the PID (Process ID) — the process responsible for using port 80.

Step 2 – Identify the Process Name

Once you have the PID, run:

tasklist | findstr 43288

Replace 43288 with the PID you found. This will tell you which program is using the port. It could be:

ProcessDescription
httpd.exeApache (often from XAMPP)
w3wp.exeIIS (Microsoft’s web server)
nginx.exeNginx server
SystemSometimes Windows services like World Wide Web Publishing Service can occupy port 80

Step 3 – Stop the Process

If you want to free port 80 immediately, you can terminate the process using:

taskkill /PID 43288 /F
  • /F forces termination.
  • Replace 43288 with the correct PID.

Step 4 – Optional: Disable Unwanted Services (Permanent Fix)

If it’s IIS:

You can disable IIS (Internet Information Services) via:

  1. Press Windows + R, type optionalfeatures and press Enter.
  2. Uncheck:
    • Internet Information Services.
    • World Wide Web Services.
  3. Click OK.

If it’s Apache from XAMPP:

Use the XAMPP Control Panel to stop/start Apache safely.


⚠️ Important Tips

  • Killing processes directly is a temporary fix.
  • If you need port 80 permanently free, check Windows Services to find auto-start services using port 80.

Summary of Commands

CommandPurpose
`netstat -aonfindstr :80`
`tasklistfindstr `
taskkill /PID <PID> /FForce kill the process using port 80

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x