use nslookup.
Code:
~/web$ nslookup
> server localhost
Default server: localhost
Address: 127.0.0.1#53
> www.example.com
See if it is returning locally for your domain. If it is then check to make sure it is listening on public IP. If that is good, then check firewall.