I just switched from pfsense to Unifi and I’m having trouble with the Policy Based Routes, specifically for domains. I’m trying to route a test domain (ip-tracker[.]org and checkip[.]org) from all networks on my FW through a third party VPN. Cloudflare 1.1.1.1 is set as my upstream provider on my WAN interface, but my computer shows my routers IP as my DNS provider.
I see both domains in the routing table stating they should go through the VPN (screenshot attached), but I’m still getting my WAN IP when I visit those sites, even though kill switch is enabled. I know the third party VPN is working, because I can route all network traffic through the VPN and it works fine, just not the specific domains.
This setup worked fine in pfsense. As I said, I’m a Unifi noob, so any help troubleshooting would be greatly appreciated.

Your DHCP is giving your computer the DNS of the router. If you want to use cloudflare then you will need to update all the clients manually or set your DHCP server to hand out DNS servers.
If you are using a privacy VPN I suggest using their DNS.
UniFI acts as my DNS. As a test I setup a policy route for my entire network for the domain ifconfig.co to route out my privacy VPN and it worked just fine.
Policy Name: Testing ipconfig.co
Secure: (nothing checked)
Route: Enabled | Domain ipconfig.co | Chose Privacy VPN | Kill Switch Enabled
QOS: (nothing checked)
This may vary for other domains and you would have to get the list of all the domains they reach out and add them to the list.
Just when I go to repeat your exact setup, looks like the domain is down at the moment. haha
Also, I’ve been setting up the policy based routes from the routing table, not the objects setting. I’m thinking it shouldn’t make a difference, but maybe it does.