Cooking from scratch is a great way for humans to to eat healthier, so you might be tempted to don an apron and start whipping up meals for Fido or Lassie, too, especially given the alarming number of commercial dog food recalls in recent years. But be forewarned: The recipes you're using may not provide your pooch the nutrition he needs.

Researchers from the University of California, Davis, School of Veterinary Medicine studied more than 200 dog food recipes from 34 different sources — including pet care books, veterinary textbooks and websites — and found 95 percent were not well balanced.

Whether commercially prepared or made at home, dog food must have the right combination of protein, fats, carbohydrates, vitamins and minerals, says Michael San Filippo, a spokesperson for the American Veterinary Medical Association. “All those things have to be at the right levels,” he says.

Related: Is Your Dog Safe at the Groomer?

Where homemade dog food can fall short 

Commercial pet food is carefully balanced, but it can be tricky to get recipes right at home. Here are six reasons why an improperly planned homemade dog diet might not be safe.

1. One size doesn’t fit all. Dog food recipes from books or websites are written for any dog, not your dog, says Jennifer Larsen, DVM, PhD, a board-certified veterinary nutritionist and lead author of the U.C. Davis study. “There are lots of problems with generic recipes,” Larsen says. It’s important to consider many factors, including individual health problems, when feeding a dog, she adds.

2. Most recipes don’t give calorie information. About 85 percent of recipes lack calorie information or guidance about how much food to feed, the U.C. Davis study found. However, it’s important to feed your dog the right amount of calories for his weight, age and lifestyle to avoid obesity, San Filippo says. “You have to look at, is your dog an active dog or more of a couch potato?” he adds.

3. Lack of balance can lead to health problems. Some of the dog food recipes studied at U.C. Davis were deficient in important nutrients such as choline, vitamin D, vitamin E and zinc. Deficiencies in key nutrients can cause immune system problems, fatty liver and musculoskeletal issues, according to U.C. Davis.

4. Balance over time might not work. You might think you can give your pooch a balanced diet by simply rotating recipes, Larsen says. But you can’t count on that strategy, known as “balance over time,” because many recipes have the same deficiencies, she says.

5. Contamination can happen at home. Yes, pet food recalls due to contamination happen. “But the same thing could occur at home,” San Filippo says. “You might have salmonella in your chicken or E. coli in your vegetables.” In fact, Larsen recommends against raw food diets for dogs, partly due to concerns over pathogens. Problems with commercial pet food are not common and usually are caught quickly by testing at the factories, San Filippo says.

6. Some ingredients might be toxic. Some dog food recipes contain ingredients that might be harmful to pets, according to the American College of Veterinary Nutrition (ACVN). Examples of foods that can cause problems for dogs include garlic, onions, chicken skin and grapes.

Related: Dog Arthritis: What Pet Owners Can Do

How to make dog food safely

It is possible to create a safe homemade dog food, but it takes dedication, Larsen says.

She suggests consulting a veterinary nutritionist, who can create recipes specifically for your canine pal. A nutritionist should have PhD credentials from an accredited university and be board-certified, Larsen says. The ACVN offers a list of veterinary nutritionists by state.

In the U.C. Davis study, only four of the recipes studied were written by veterinary nutritionists, and all of those recipes provided appropriate nutrition for adult dogs.

“Anyone can call themselves a nutritionist and charge money for their services without any regulatory oversight, licensure, or expertise,” Larsen says. So check the credentials of any expert you’re considering working with to create a diet for your dog, she urges.

Another option: use a service run by a veterinary nutritionist, such as PetDiets.com or BalanceIt.com, Larsen says.

Also, decide whether you’re up to the task of playing chef to your pooch. “It’s time-consuming and more expensive than commercial food,” Larsen says.

Related: Dog Toys: Which Ones Are Safest?

Allie Johnson is an award-winning freelance consumer writer with a degree in magazine journalism. She lives in Georgia with her husband and two dogs.