diatomaceous earth is great for keeping slugs and snails off your dog. Not sure how many dogs have such problems.The whole idea of diatomaceous earth is that soft belly critters that crawl, will crawl over the diatomaceous earth and scrape up their abdomens. In the case of snails and slugs in the garden the abrasions cause them to become dehydrated and die. You have to reapply it to the soil after each rain.
But for fleas they should be able to walk or jump over the crystals, with no effect to themselves.
Also the status of the immune system has nothing to do with getting or repelling fleas. If a healthy dog or a dog with an impaired immune system is around another dog with fleas both are equally likely to have a flea jump on them and start biting. However, mites such a Demodex (puppy mange) are small enough to have interactions with the dog's immune system. An older geriatric dog that suddenly comes down with demodex mange has an impaired immune system and should be checked for cancer.
Bookmarks