Windows VPS & RDP

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.

BeginnerWindows server5 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. Windows VPS and Admin RDP both include it.
  • Your connection address in the form 203.0.113.10:3389. servers use TCP port 3389 for Remote Desktop.

Note: 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

  1. Press Win + R, type mstsc and press Enter.
  2. Enter 203.0.113.10:3389 and click Show Options.
  3. Open the Experience tab.
  4. Tick Reconnect if the connection is dropped.
  5. Go back to General and click Save (or Save As) so the setting is kept in your .rdp file.

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:3389
autoreconnection enabled:i:1
autoreconnect max retries:i:20
  • autoreconnection enabled:i:1 turns automatic reconnection on.
  • autoreconnect max retries sets 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:

  1. Press Win + R, type gpedit.msc and press Enter.
  2. Go to Computer Configuration → Administrative Templates → Windows Components → Remote Desktop Services → Remote Desktop Session Host → Connections.
  3. Open Configure keep-alive connection interval, choose Enabled and set the interval in minutes, for example 1.
  4. In the same folder, check that Automatic reconnection is not set to Disabled. Not Configured or Enabled both allow reconnection.
  5. Click OK, then apply the policy:
PowerShell
   gpupdate /force

Tip: Existing 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:

CMD
ping -t 203.0.113.10

Press 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:

PowerShell
Test-NetConnection 203.0.113.10 -Port 3389

If 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

  1. Connect to your server and open a program, such as Notepad with some text.
  2. Turn off Wi-Fi on your PC for 10–20 seconds, then turn it back on.
  3. 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:

CMD
quser

Your 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 .rdp file and confirm autoreconnection 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

Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.