It doesn't work through the domain. Moreover, some services use not only multiple IP addresses per domain but also multiple domains. You can track them here Adaptive QoS - Web History. I can offer you a script that can collect IP addresses and set up routing rules for you.
It can obtain IP addresses or even subnets where IPs belong and set up rules for you.
Actually, the routing rules based on domains would be a good idea because of various domains that are difficult to track. It is easier to find IP addresses and networks. The bunch of different domains can be linked to 1 IP. You can spot some domains tracking on 'Web history' and then easy to figure out IP addresses and their networks to add them to rules. You can represent 255 IP addresses by CIDR (xxx.xxx.xxx.xxx/24) but each domain from 255 pool demands a separate line in rules.