DNS check is good if you have split-DNS, though caching can catch you out so watch the TTL on the record you're using. We used to use a socket based check, because we don't have split DNS, but now we have a connection-less VPN check available and use that to programatically set the build offline