Skip to content
Follow
Windows

How to Change Remote Desktop Port in Windows 11

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

Shifting the Remote Desktop listening port away from the standard address is one of the quickest ways to lock down a Windows 11 machine.

⚡ Quick Answer

Open Registry Editor and navigate to 🗝️HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp. Modify the PortNumber value to your desired custom port. Then, update Windows Firewall by creating a new inbound rule for your chosen TCP port.

Why change the Remote Desktop port?

Moving away from port 3389 makes it harder for hackers to find and attack your computer. This port number is the standard address that Remote Desktop connections use by default.

What happens when done?

After changing the port and updating your firewall, your computer stops listening on the default port 3389. Instead, incoming remote connections arrive only on the new custom port. Remember to include this new port number when connecting from other devices.

Step 1Back Up Your Registry (Required)

⚠️Warning
This step requires administrator privileges. Proceed carefully when editing the registry because mistakes cause system instability. Always create a backup first by going to File Export in the Registry Editor.

Step 2Change the Port in Registry Editor

Editing the Windows Registry requires administrator rights, so make sure you are signed into an account with proper permissions before proceeding. Open the Registry Editor by typing regedit into the Windows search bar . Navigate to the specific path for Remote Desktop settings to locate the port number.

  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
windows 11 change remote desktop default 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
edit remote desktop port

Step 3Update Windows Firewall

After changing the port, update Windows Firewall to let connections through on the new port. Open Windows Firewall with Advanced Security and create a new inbound rule. Set the rule to allow TCP connections on the new port number across all network profiles.

  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 4Verify and Connect

Restart the computer to apply changes. To confirm the changes are working, open PowerShell as an administrator and check active ports. To connect from a client device later, include the new port in your connection settings: 192.168.1.50:5555.

Summary

Modifying the Remote Desktop port stops automated bots from finding the machine during scans.

Does changing the RDP port improve security?

Does changing the Remote Desktop Protocol (RDP) port improve security? Yes, it reduces "noise" from automated bots. While this adjustment is not a complete security solution, it hides the service from common port scanners looking only for port 3389. This reduction cuts down the number of brute-force login attempts hitting the system.

What happens if I forget the new RDP port?

Losing track of the new port blocks remote access until you check the registry again.

Was this guide helpful?

Tags: #Windows 11
Was this helpful?
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.

📚 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

No comments yet — be the first to share your thoughts!

Leave a Comment

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