In order to get rid of flies for good, you will have to treat both your dog and the environment he lives in.
Keeping your dog clean and healthy will go a long way in making him less attractive to flies. A dirty or matted fur coat will attract flies, while certain skin conditions and diarrhoea will worsen the problem even further. Regular baths and brushing will help keep your dog’s coat in top condition. If your dog is having diarrhoea, take him to the vet for examination and treatment and make sure to keep his perineum (rear end) clean during his recovery – you may need to wash the area or even consider clipping the surrounding hair if it is very long and troublesome.
Flies are also most active during the hottest parts of the day – consider keeping your dog indoors during these times
Flies often target the ears to make painful wounds, which in turn attract even more flies. You can use some saline or dilute chlorhexidine to clean the wounds and apply a suitable ointment or repellent. Make sure the preparation is safe to use on your pet – your local vet shop or pet shop will be happy to advise you in this regard. As a general rule, never use dog preparations on cats – most of these preparations contain pyrethroids, which are toxic to cats. Also avoid any human products, essential oils or garlic (tasty for us but poisonous for pets). Some of these sprays can even be used on your dog’s bedding or resting areas – apply as often as required. Fly strips and fly traps may also help draw the flies away from your dog.
Remember that flies are scavengers – they are constantly looking for a meal in which to lay their eggs and continue their life cycle. Thus the best way of getting rid of them for good is to remove their food source, which means maintaining good hygiene in and around your home. Clean up all the waste in your yard, including food, faeces and half-chewed bones (though you shouldn’t be giving your dog bones), clean out your rubbish bins regularly so they don’t overflow and keep your dog’s food and water bowls clean. If you have a compost heap, keep it covered.
Certain herbs also repel flies in addition to being useful in the kitchen – consider planting some basil, bay leaf, mint or rosemary in your garden. Other herbs, such as lavender, sweet woodruff and tansy also repel flies while being nice for people.