If your dog scratches himself a little too much, it is probably the sign of dry skin, and the symptoms can be very similar to an ear infection.
That can happen for various reasons and the best solution is to get your dog the best dog shampoo for dry skin. Of course, consult with your vet and listen to his advice.