Connect to Remote Desktop with a domain name instead of an IP
Point a DNS A record such as rdp.example.com at your server and connect as rdp.example.com:12230. Covers TTL, IP changes and testing with the hosts file.
- Beginner
- Windows VPS · Admin RDP
- 4 min read
An IP address like 203.0.113.10 is hard to remember and easy to mistype. If you own a domain, you can create a name such as rdp.example.com that points at your server and connect with rdp.example.com:12230 instead. If the server IP ever changes, you update one DNS record and every saved connection keeps working.
Before you start
- A domain you own, for example
example.com, and access to its DNS settings. This is usually at your domain registrar or a DNS provider such as Cloudflare. RunRacks does not sell domains. - Your server's public IP address from the Dashboard.
- A Remote Desktop client. RunRacks servers accept Remote Desktop on TCP port 12230, and a domain name does not change that. You still add
:12230.
DNS only turns a name into an IP address. It does not carry a port, so the port always goes in your Remote Desktop client.
Create the A record
Sign in to your DNS provider and open the zone for example.com. Menu names differ between providers, but the record is the same everywhere.
- Choose Add record.
- Set the fields:
- Type:
A - Name / Host:
rdp(this makesrdp.example.com) - Value / Points to:
203.0.113.10(your server IP) - TTL: a short value such as 300 seconds while you test. Some providers call this Auto.
- Save the record.
If you use Cloudflare, set the record to DNS only (grey cloud). Cloudflare's normal proxy handles web traffic and will not pass Remote Desktop on port 12230.
Check the name resolves
New records usually appear within minutes, but caches can take up to the TTL to update. Check from Windows PowerShell:
Resolve-DnsName rdp.example.com -Type AThe IPAddress column should show your server IP. On macOS or Linux:
dig +short rdp.example.comThe output should be a single line with 203.0.113.10.
Connect using the name
Windows
mstsc /v:rdp.example.com:12230Or type rdp.example.com:12230 in the Computer box of Remote Desktop Connection.
Mac, iPhone, iPad and Android
In Windows App, add a PC and enter rdp.example.com:12230 as the PC name.
Update saved connections
Edit any saved .rdp file so the address line reads:
full address:s:rdp.example.com:12230The first time you connect by name, the client shows a certificate warning again. That is expected: the client sees a new name and the server's self-signed certificate was issued to the computer name, not to your domain. Check the details and accept it. To remove the warning for good, see Install a trusted TLS certificate for Remote Desktop.
TTL and IP changes
The TTL tells other DNS servers how long they may cache your record.
- Short TTL (300 seconds): changes spread quickly. Use this before a planned move to a new server.
- Longer TTL (3600 seconds or more): fewer lookups, but a change can take that long to reach everyone.
When your server IP changes, for example after you move to a new server plan:
- A day ahead, lower the TTL to 300.
- Once the new server is ready, change the A record value to the new IP.
- Wait for the old TTL to pass, then connect with the same name.
- When everything works, raise the TTL again if you want.
Test before DNS is ready with the hosts file
You can try the name on your own PC before changing public DNS, or point it at a new server early. Windows reads C:\Windows\System32\drivers\etc\hosts before asking DNS.
- Open Notepad as Administrator.
- Open
C:\Windows\System32\drivers\etc\hosts(set the file filter to All files). - Add a line at the bottom:
203.0.113.10 rdp.example.com- Save, then connect to
rdp.example.com:12230.
Remove the line when you finish testing. A forgotten hosts entry keeps sending you to the old IP even after you change public DNS.
Check it works
Test the port by name:
Test-NetConnection rdp.example.com -Port 12230You should see RemoteAddress showing your server IP and TcpTestSucceeded : True. Then connect with your client and sign in.
Troubleshooting
- "Remote Desktop can't find the computer": the name does not resolve yet. Run
Resolve-DnsNameand check the record name and value. Flush your local cache withipconfig /flushdnsand try again. - Name resolves, but the connection fails: you left off
:12230, or the record is proxied through a CDN. Use the plain DNS-only record and include the port. - Old IP keeps coming back: a hosts file entry or a cached record. Check the hosts file and wait for the TTL to pass.
- Certificate name mismatch warning: normal with the default self-signed certificate. Accept it after checking, or install a trusted certificate for that name.
Next steps
- Review the port basics: RunRacks RDP port 12230.
- Understand the certificate prompt: The identity of the remote computer cannot be verified explained.
- Save the name in a one-click file: Save a Remote Desktop connection as a one-click shortcut.
- Need a server? Compare Windows VPS plans.
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