You can't use $dns like that, you have to do a /dns and then use on DNS to get what it resolved to.