To use coconut oil to help treat or prevent your dogs ear infection, put a small amount of coconut oil at the entrance to their ear canal. Next, massage the coconut oil down into their ear. Not only can this help promote healthy skin in your dogs ear, but the coconut oil can smother and kill any ear mites that have found their way inside.