Follow
Windows

How to Change Remote Desktop Port in Windows 11

Richard
Written by
Richard
Jul 5, 2022 Updated Apr 29, 2026 2 min read
How to Change Remote Desktop Port in Windows 11

This guide explains how to change the remote desktop listening port in Windows 11.

Why change the Remote Desktop port?

By default, Windows uses port 3389 for Remote Desktop connections. Because this port is well-known, automated bots constantly scan the internet for it to attempt unauthorized access. Changing your port to a custom number acts like moving your front door to a secret location, making it much harder for automated scans to find your computer.

What happens when done?

Once you change the port and update your firewall, your computer will stop listening on the default port 3389. It will only accept incoming remote connections on your new custom port. You must include this new port number when connecting from other devices.

Step 1: Back Up Your Registry (Required)

Warning: This step requires administrator privileges. Editing the registry can cause system issues if done incorrectly. Always create a backup first by clicking File > Export in the Registry Editor.

Step 2: Change the Port in Registry Editor

Note: This step requires administrator privileges.

  1. Click the Search icon and type regedit to open the Registry Editor.
  2. Navigate to this path: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp
Windows 11 settings for changing the default Remote Desktop port
  1. Find the PortNumber entry on the right side.
  2. Right-click it and select Modify.
  3. Select the Decimal option.
  4. Type your new port number (e.g., 5555) and click OK.
Editing the PortNumber value in Windows Registry Editor for RDP

Step 3: Update Windows Firewall

Note: This step requires administrator privileges. Your computer will block the new port unless you allow it through the firewall.

  1. Open Windows Firewall with Advanced Security.
  2. Click Inbound Rules and then New Rule on the right.
  3. Select Port, click Next, and choose TCP.
  4. Enter your new port number in Specific local ports.
  5. Follow the prompts to Allow the connection for all profiles.

Step 4: Verify and Connect

Restart your computer to apply changes. To verify it is working, open PowerShell as an administrator and run: netstat -ano | findstr :YOUR_NEW_PORT. To connect from a client, format your connection string as: 192.168.1.50:5555.

Summary

Changing your Remote Desktop port is an effective way to secure your system against automated attacks. By using the Registry Editor and updating your Windows Firewall, you can move your connection to a custom port. Always remember to use the format IP:Port when connecting, and keep your new port number stored safely.

Does changing the RDP port improve security?

Yes, it improves security by reducing “noise” from automated bots. While it is not a complete security solution, it hides your service from common port scanners that only look for the default 3389 port, effectively reducing the number of brute-force login attempts your system receives.

What happens if I forget the new RDP port?

If you forget the port, you will be unable to connect remotely. You will need physical access to the computer to check the registry path HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp to see the current PortNumber value. Always save your new port number in a secure password manager.

Was this guide helpful?

Tags: #Windows 11
Richard

About the Author

Richard

Tech Writer, IT Professional

Richard, a writer for Geek Rewind, is a tech enthusiast who loves breaking down complex IT topics into simple, easy-to-understand ideas. With years of hands-on experience in system administration and enterprise IT operations, he’s developed a knack for offering practical tips and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.

2477 articles → Twitter

📚 Related Tutorials

How to Back Up and Restore Windows 11 Registry
Windows How to Back Up and Restore Windows 11 Registry
How to Open and Edit Windows 11 Registry
Windows How to Open and Edit Windows 11 Registry
How to Open PowerShell in Windows 11
Windows How to Open PowerShell in Windows 11
How to Secure Your Windows 11 Device Portal
Windows How to Secure Your Windows 11 Device Portal

Leave a Reply

Your email address will not be published. Required fields are marked *