At the kernel layer all it sees is IP. Your best best would be to do the IP lookup but that can be problematic if they use multiple IPs, share IPs with other sites or change IPs at some point.
Luckily most of these big sites tend to use a low number of anycast IP addresses so it may be pretty effective. Sometimes they will even publish IP ranges.
Luckily most of these big sites tend to use a low number of anycast IP addresses so it may be pretty effective. Sometimes they will even publish IP ranges.