History will tell you that cedar has been used for centuries in various forms as a repellent of insects and small critters that find the smell of this bark very obnoxious, and will avoid getting near cedar wood or cedar products.
Fortunately, we have Grandma's notorious cedar chest to stand as a witness that moths and many other insects do not go where cedar is. Cedar closets, also, are built for just that reason.
There are many manufacturers that produce cedar products in sprays, deck sealers, pet products, insecticides and other applications that allow the consumer to apply cedar oils and diffusions wherever they are needed. In addition, cedar can be used in it's solid forms, and they are many.
See below for some exciting options that you may want to explore for your problems with fleas, other insects or somewhat larger vermin.
Look online under "cedar products" to find a huge variety of ways to address your flea infestation or other problem. There are many kinds of products that fit into any kind of need you may have. Granules and shavings can be sprinkled around the house at the foundation to repel termites, scorpions, spiders and snakes.
Look for cedar shavings in any store that carries pet supplies. You can purchase a huge block (about half the size of a bale of hay) of cedar shavings that are sold for pet bedding and pet cages. These can be used to sprinkle around your yard, stuffed into pillowcases as a pet bed, put into sachets for drawers or in areas you wish to treat, such as closets. The cost of this type of product is about $9.00, and it will cover an entire yard.
Use cedar chips or sprays in and around the home as a non-toxic way to get rid of fleas, ants, mites and moths. Sprays are produced that are used on the skin to repel mosquitoes and other insects.
Look for cedar soaps to be used in the laundry or in a hose-end sprayer for a variety of organisms that simply cannot tolerate red cedar. Look also for shampoos that will address head lice.
Use cedar on pets, as cedar shampoos and soaps kill fleas, ticks and microorganisms that cause skin problems and infection.
Freshen problem areas with cedar sprays.
Soak cedar chips or use your blender and strain the liquid to make your own cedar spray.