getent queries the system resolver exactly like applications do, honoring /etc/hosts, mDNS, and DNS in one go. If getent resolves but dig does not, /etc/hosts or NSS settings are involved. This is the best check for what your own server will actually see.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.