When a dog scratches his ears and shakes his head, it is probably a sign of an ear infection, according to WebMD. The infection is usually caused by yeast or bacteria.
Many conditions lead to ear infections, including ear mite infestation, ear hair, tumors, allergies, ear wax build-up and hypothyroidism, WebMD states. Because of the angle of dogs' ear canals, it is easy for water to become trapped in them. Therefore, swimming, baths or improper ear cleaning also are possible contributors to ear infections. Floppy-eared breeds, such as cocker spaniels and golden retrievers, are prone to infections. Typically, an infection is treated with a professional ear cleaning, home cleansing and topical or oral medication.