Shared server guidance · Question & answer

When should I clear the Windows DNS cache for a server?

Clear the local DNS cache when your Windows computer may be reusing an outdated cached answer after a confirmed DNS change. This does not update authoritative records, clear every application cache or force other resolvers to refresh immediately.

BeginnerLocal Windows CMD or Windows PowerShell with DnsClient
Go to the answer

Instructions

1. Confirm the expected DNS answer first

Check the published record through your approved DNS tools and confirm the server address. Clearing a cache will not fix a wrong authoritative record.

2. Clear the local client cache

Use one of these equivalent methods in the appropriate local shell. Administrative rights may be required by your Windows environment.

Local Windows PowerShell
Clear-DnsClientCache

This removes cached entries from the local Windows DNS client.

Local Windows CMD
ipconfig /flushdns

This is the CMD alternative. It affects your Windows computer, not the remote server.

3. Resolve and reconnect again

Query the actual name and retest the service using normal TLS or SSH identity checks.

Local Windows PowerShell
Resolve-DnsName -Name vps.example.com -Type A -DnsOnly

Compare the returned address with the current authoritative record and service details.

Check the result

  • The local cache clear completes without an error.
  • The subsequent DNS answer and service endpoint match the intended current server.

Troubleshooting

The old address still appears
The upstream resolver may still cache it, the authoritative record may be wrong, or the application may use another resolver.
Only one application remains affected
Check that application’s DNS behaviour or restart its connection normally; do not repeatedly change global network settings.

Official references

Use the documentation for your installed version when a flag, service name or platform feature differs.