Try to use dns_name before public and private ip address

Uses public dns name over public and private ip addresses.  Would solve issue addressed in #14

This may need to be configurable but I think in most cases you would want to use the domain name over public ip.  I'm not familiar with VPC though and I'm not sure how dns_name behaves in that situation.