Really good for fleas is diatomaceous earth and it is cheap to buy and use and wholly non-toxic. I sprayed it on my yard some years ago and have not been bothered by our once annual spring siege since. The dog stays in the yard and does not get fleas. It is good for any bugs with segmented shells. It does not wash away with the rain unless you have a pretty severe slope.
Diatomaceous earth will also keep ants and roaches away from dog food. We used to have ants parked in our mailbox - very annoying - till we dusted it with DE. Of course, had to explain to the mailman that the white powder is NOT an illegal drug!)
Does this work for ticks?