Remote Access & Licensing
Remote Access & Licensingadvanced18 min read·Updated Oct 7, 2026

Deploy Remote Desktop Gateway on Windows Server 2025

Learn how to deploy Remote Desktop Gateway on Windows Server 2025 to secure external RDP access using HTTPS, authorization policies, certificates, and controlled remote desktop connectivity.

Genuine, fully-licensed Windows
Spin up a Windows Server: full admin, RDP-ready
Genuine Windows Server 2019, 2022, or 2025 with full administrator access. We handle the Microsoft licensing, billed monthly with nothing to buy upfront.

In short

Remote Desktop Gateway (RD Gateway) provides a secure way to access Remote Desktop Services from outside the network without exposing internal Session Hosts directly to the internet. It uses HTTPS-based communication, access policies, and certificate-based security to control remote desktop access.

This guide explains the role of RD Gateway, its architecture, prerequisites, deployment approach, and how it fits into a secure Windows Server remote access strategy.

Why use Remote Desktop Gateway?

Directly exposing Remote Desktop Protocol (RDP) access to the internet creates unnecessary risk. A public Session Host can become a target for password attacks and unauthorized access attempts.

RD Gateway creates a controlled access layer between external users and internal RDS servers.

Without RD Gateway:

Text
Remote User ↓ Internet ↓ Session Host

With RD Gateway:

Text
Remote User ↓ HTTPS (443) ↓ RD Gateway ↓ Internal RDS Servers

The gateway becomes the secure entry point for remote desktop connections.

RD Gateway architecture

A basic RD Gateway path to an approved internal Windows target looks like this:

Text
Remote Desktop Client ↓ HTTPS / TCP 443 ↓ RD Gateway ↓ Approved internal RDP target

An RDS collection can also use RD Connection Broker to manage sessions and RemoteApp connections. RD Connection Broker is not required for every standalone RD Gateway-to-host connection.

RD Gateway is commonly combined with MFA to add identity protection before users reach internal Windows workloads.

Related:

  • Secure Direct RDP on a Windows VPS
  • Add MFA to Remote Desktop Services on Windows Server 2025

Prerequisites before deployment

Before installing RD Gateway, prepare:

  • Windows Server 2025 with Desktop Experience (the RD Gateway role service is not available on Server Core);
  • Remote Desktop Services environment;
  • public DNS record;
  • valid SSL certificate;
  • firewall access for HTTPS;
  • user and resource authorization plan.

A production deployment should avoid exposing Session Hosts directly to the public internet.

Install the Remote Desktop Gateway role

Windows Server 2025 Add Roles and Features wizard showing Remote Desktop Gateway selected under Remote Desktop Services role services

Alt text: Windows Server 2025 Add Roles and Features wizard showing Remote Desktop Gateway selected under Remote Desktop Services role services

RD Gateway is installed through Windows Server roles.

General workflow:

  1. Open Server Manager.
  2. Add Remote Desktop Services roles.
  3. Select Remote Desktop Gateway.
  4. Complete the role installation.
  5. Configure the gateway with the required certificate and policies.

Don’t have a server yet?

Configure RD Gateway policies

Windows Server RD Gateway Manager showing gateway status, connection authorization policies, and resource authorization policies configuration areas

Alt text: Windows Server RD Gateway Manager showing gateway status, connection authorization policies, and resource authorization policies configuration areas

RD Gateway uses two important policy types:

Connection Authorization Policies (CAP)

Windows Server RD Gateway Connection Authorization Policy showing authentication requirements and allowed user groups for remote access

Alt text: Windows Server RD Gateway Connection Authorization Policy showing authentication requirements and allowed user groups for remote access

CAP controls who is allowed to connect through the gateway.

Examples:

  • administrators only;
  • specific Active Directory groups;
  • approved remote users.

Resource Authorization Policies (RAP)

Windows Server RD Gateway Resource Authorization Policy showing allowed user groups, RDS Session Hosts, and permitted RDP ports

Alt text: Windows Server RD Gateway Resource Authorization Policy showing allowed user groups, RDS Session Hosts, and permitted RDP ports

RAP controls which internal resources users can access after authentication.

Examples:

  • specific Session Hosts;
  • specific server groups;
  • approved internal networks.

Together, CAP and RAP provide controlled access management.

Configure SSL certificates

RD Gateway uses HTTPS communication, which requires a trusted certificate.

Important considerations:

  • certificate name should match the public DNS name;
  • certificates should come from a trusted certificate authority;
  • certificates should be renewed before expiration.

Certificate problems are one of the most common causes of RD Gateway connection failures.

Firewall requirements

The main external requirement is:

Text
TCP 443 HTTPS

Avoid exposing:

Text
TCP 3389 RDP

directly to the public internet when using RD Gateway.

The firewall design should allow users to reach the gateway while keeping internal Session Hosts protected.

Testing RD Gateway access

A successful test should confirm:

  1. Remote Desktop Client is configured to use the gateway.
  2. User authenticates successfully.
  3. Gateway accepts the connection.
  4. User reaches the assigned Session Host.

Test using a normal user account before enabling access for all users.

Troubleshooting RD Gateway

Certificate errors

Check:

  • certificate name;
  • certificate trust chain;
  • expiration date;
  • gateway configuration.

Users cannot connect

Review:

  • CAP policies;
  • RAP policies;
  • Active Directory permissions;
  • network connectivity.

Gateway works internally but not externally

Check:

  • DNS configuration;
  • firewall rules;
  • public certificate configuration;
  • HTTPS availability.

RD Gateway with MFA

For production environments, RD Gateway is commonly combined with MFA.

The recommended flow:

Text
User ↓ RD Gateway ↓ MFA Provider ↓ Connection Broker ↓ Session Host

This prevents a stolen password from being enough to access Windows workloads.

Choosing a secure Windows VPS provider

RD Gateway protects remote access, but the underlying infrastructure still matters.

For business Windows workloads, consider:

  • reliable Windows Server infrastructure;
  • recovery options;
  • scalable resources;
  • operational support when remote access problems occur.

A secure Windows environment requires both strong access controls and dependable infrastructure.

Final RD Gateway checklist

  • RD Gateway installed
  • Public DNS configured
  • SSL certificate installed
  • CAP policies configured
  • RAP policies configured
  • HTTPS firewall access enabled
  • Direct public RDP exposure removed
  • MFA considered for production access

What's next

Was this article helpful?

Published August 27, 2026 · Updated October 7, 2026

Back to hub
Ready when you are

Your Windows Server, live in ~55 seconds

Genuine, fully-licensed Windows with full admin and RDP. We handle the Microsoft licensing, billed monthly with nothing upfront. On NVMe SSD, backed by a 14-day money-back guarantee.

Related articles