Make Remote Desktop reconnect automatically after drops
Turn on automatic reconnection in the Remote Desktop client and .rdp file, set a keep-alive interval on the server and check whether your network is the real cause.
- Beginner
- Windows VPS · Admin RDP
- 5 min read
A short Wi-Fi drop or a mobile hotspot switching towers can close your Remote Desktop window, even though the server and your apps are still running. Remote Desktop can reconnect on its own and put you back into the same session. This guide shows the client setting, the matching .rdp lines, a server keep-alive policy and simple checks to find out whether your network needs fixing.
Before you start
- A Remote Desktop client: Remote Desktop Connection (
mstsc) on Windows, or Windows App on Mac, iPhone, iPad or Android. - Administrator access on the server for the keep-alive policy. RunRacks Windows VPS and Admin RDP both include it.
- Your connection address in the form
203.0.113.10:12230. RunRacks servers use TCP port 12230 for Remote Desktop.
Disconnecting does not close your programs. When you reconnect with the same user, you return to the same session with apps still open, unless a session time limit signs you out.
Turn on reconnect in Remote Desktop Connection
- Press Win + R, type
mstscand press Enter. - Enter
203.0.113.10:12230and click Show Options. - Open the Experience tab.
- Tick Reconnect if the connection is dropped.
- Go back to General and click Save (or Save As) so the setting is kept in your
.rdpfile.
When the link drops, the session window stays open with a banner while the client tries again. It keeps trying for a limited number of attempts before giving up.
Set it in an .rdp file
If you share connection files or use a saved shortcut, check these lines in Notepad:
full address:s:203.0.113.10:12230
autoreconnection enabled:i:1
autoreconnect max retries:i:20autoreconnection enabled:i:1turns automatic reconnection on.autoreconnect max retriessets how many times the client tries before it stops. A higher number helps on unreliable links.
The full list of lines is in Create and edit .rdp files: the settings that matter.
Windows App on Mac and mobile
Windows App reconnects automatically for most short drops and has no separate switch for it in most versions. If sessions close on every blip, update the app first, then check your network with the steps below.
Add a keep-alive on the server
Some routers and mobile networks close idle connections after a few minutes. A keep-alive makes the server send small packets so the connection stays visibly active, and it helps the server notice dead connections and mark the session as disconnected cleanly.
On the server, sign in as an administrator:
- Press Win + R, type
gpedit.mscand press Enter. - Go to Computer Configuration → Administrative Templates → Windows Components → Remote Desktop Services → Remote Desktop Session Host → Connections.
- Open Configure keep-alive connection interval, choose Enabled and set the interval in minutes, for example
1. - In the same folder, check that Automatic reconnection is not set to Disabled. Not Configured or Enabled both allow reconnection.
- Click OK, then apply the policy:
gpupdate /forceExisting sessions pick up the change after you sign out and back in.
Check your network stability
Auto-reconnect hides short drops but does not fix a bad line. Test from your own PC.
Run a continuous ping to the server for a few minutes while you work:
ping -t 203.0.113.10Press Ctrl + C to stop. Look at the summary:
- 0% loss and steady times: the network is fine; look at server-side causes.
- Regular "Request timed out" lines: packets are being lost between you and the server.
- Times that jump from low to several hundred ms: congestion, often from Wi-Fi or other devices using the line.
Also confirm the RDP port answers:
Test-NetConnection 203.0.113.10 -Port 12230If you see drops, try a wired connection or a different network to compare. Some servers may not answer ping if ICMP is blocked in Windows Firewall; in that case rely on the port test.
Check it works
- Connect to your server and open a program, such as Notepad with some text.
- Turn off Wi-Fi on your PC for 10–20 seconds, then turn it back on.
- The session window should show a reconnecting banner, then return to the same desktop with Notepad still open.
On the server, you can confirm the session stayed alive:
quserYour user should be listed with a state of Active.
Troubleshooting
- Window closes instead of reconnecting: the setting was not saved in the file you open. Edit the shortcut's
.rdpfile and confirmautoreconnection enabled:i:1. - Reconnects, but to a new empty desktop: you signed in with a different user, or a policy ended the old session. Check Stop Remote Desktop sessions ending when idle or disconnected.
- Drops every few minutes exactly: a router or firewall closes idle connections. Set the keep-alive interval as shown above.
- Constant drops even on a good network: see Fix Remote Desktop that keeps disconnecting for deeper checks, including UDP issues.
Next steps
- Keep programs running after you disconnect: Keep apps running 24/7 on your RDP server.
- Need a stable desktop for long sessions? See Windows Admin RDP.
Was this guide helpful?
Still stuck?
Ask RunRacks AI for a quick answer, or open a ticket and our team will take a look at your server.
Related guides
Windows VPS & RDP
RunRacks RDP port 12230: how to connect to your Windows VPS and Admin RDP
RunRacks Windows VPS and Admin RDP servers accept Remote Desktop on port 12230, not 3389. Here is how to connect from every device and keep the port open.
- Beginner
- Windows VPS · Admin RDP
- 5 min read
Windows VPS & RDP
Allow or block multiple RDP sessions for one user
Understand why a new Remote Desktop login takes over your old session, how the single-session policy works on Windows Server, and which setting suits a team.
- Advanced
- Windows VPS
- 5 min read
Windows VPS & RDP
Create Windows users with Remote Desktop access
Give each person their own Windows login, add them to Remote Desktop Users, test the account and remove access cleanly later.
- Beginner
- Windows VPS · Admin RDP
- 2 min read