Prerequisites
Before flushing DNS cache, make sure you have:
- SSH access to your VPS
- Root or sudo privileges
For systemd-resolved systems
Connect to your VPS:
ssh hxroot@YOUR_SERVER_IP -p 22
sudo systemd-resolve --flush-caches
Or:
sudo resolvectl flush-caches
Check if systemd-resolved is Running
sudo systemctl status systemd-resolved
Restart DNS Resolver
sudo systemctl restart systemd-resolved
✅ DNS cache has been flushed.