Many experts recommend baking the stuffing outside the bird, where it can easily be cooked to 165°F and is less likely to harbor bacteria. However, many people who grew up eating stuffing from inside the bird find it lacking moisture and flavor when it's baked in a casserole dish, without the benefit of the turkey's juices.
Luckily, whichever method you prefer, there are ways to get around the problems. If you choose to bake your stuffing alongside the bird, drizzle 1/4 to 1/2 a cup of extra stock over it before it goes in the oven. This will replace the extra moisture and flavor the turkey would have provided. Using a rich, flavorful homemade stock will also go a long way toward providing that indescribable roast-turkey richness.
If you still want to cook the stuffing inside the bird, you should take several precautions to ensure safety. First, do not stuff your turkey until right before it goes in the oven. Yes, when faced with a long list of Thanksgiving Day tasks, it's tempting to stuff the bird the night before, stow it in the fridge, and then just pop it in the oven the next morning. But this will create an optimal environment for bacteria to flourish: The moist stuffing, likely warm from the cooked veggies and stock, will sit in the fridge for hours before it gets below the "danger zone"—the range of temperatures in which bacteria can grow. This will allow any bacteria present, already thriving in the moist conditions, to multiply like crazy. Once the stuffing finally cools down, they won't be killed—they'll just stop multiplying as quickly. Then, when the turkey goes into the oven, the stuffing, now cold from the fridge, will take quite a while to heat up, again spending hours in the danger zone.
Instead of this risky procedure, cook any veggies for the stuffing the night before, but do not mix them with the bread, stock, and eggs. (Even if you don't stuff the bird, just mixing the wet ingredients and the bread can be too inviting to bacteria.) The next morning, heat the stock and combine it with the other stuffing ingredients, then immediately fill and roast the bird. Using warm stuffing and putting the turkey in the oven immediately will help the stuffing spend as little time in the "danger zone" as possible.
Finally, when the bird is done, take the temperature of the stuffing as well as the meat. Bacteria cannot survive above 165°F, so most recipes call for using a probe thermometer to verify that the thigh has reached this temperature before removing the turkey from the oven. (Some cooks prefer to remove their birds at 150°F on the assumption that the temperature will rise to 165°F as the meat rests; this is safer if you buy an organic or heritage turkey, which is less likely to contain bacteria
However, just because the thigh meat has reached 165°F doesn't mean the stuffing has, too. So, be sure to insert your thermometer into the very center of the cavity as well. If the bird is done but the stuffing isn't, use this tip: spoon the stuffing out into a bowl and microwave it until it registers 165°F. This will allow you to have moist, not overcooked meat and safe stuffing at the same time.