Cream cheese. Whether you use it to make frosting for your red velvet cake or just spread it on your morning bagel, this crowd-pleaser is sure to satisfy your craving for delicious comfort food.

And speaking of cravings, if you’re pregnant, you may find this treat — whether used in sweet or savory dishes — even more irresistible. But perhaps you’ve heard that you need to avoid soft cheeses while pregnant.

This begs the question: Can you eat cream cheese while pregnant? The answer is generally yes (cue the cheers from all you cheesecake lovers out there!) with a few things to keep in mind.

You’ve probably been warned about soft cheese during pregnancy — like Brie, Camembert, chèvre, and others — but the thing is, cream cheese isn’t actually in this category. It’s soft, all right — but that’s because it’s a spread.

Cream cheese is usually made from cream, although it can also be made from a cream and milk combo. The cream or cream and milk are pasteurized — which means they’re heated to temperatures that kill pathogens (“bad” bacteria) and make it safe for consumption. It’s then curdled, usually by introducing lactic acid bacteria (“good” bacteria).

Finally, cream cheese makers heat the curds and add stabilizers and thickeners to give the spread its characteristic smooth texture.

The key step in the making of American cream cheese that makes it safe for pregnant women to consume is the pasteurization of the cream.

Like we mentioned, the heating process kills harmful bacteria. This includes listeria bacteria, which can cause a dangerous infection in those with weaker immune systems like newborns, older adults, and — you guessed it — pregnant people.

So cream cheese lovers rejoice — it’s safe for you to consume while pregnant.

We weren’t able to find a single store-bought cream cheese that contained raw, unpasteurized cream. Presumably, though, such a product might be out there. Likewise, you may come across recipes for making your own cream cheese using raw cream.

In addition, there are products that are much like cream cheese in other countries that might use raw dairy. Probably the most notable example is Neufchâtel cheese, which comes from France and is made with unpasteurized milk.

So if your friend brings you back French Neufchâtel cheese and a bottle of French wine, you’ll need to take a pass on both — at least until your bun is out of the oven. (Note that American versions of Neufchâtel cheese are pasteurized and therefore safe.)

Consuming cream cheese made from unpasteurized cream or milk isn’t safe if you’re pregnant, period. It can lead to listeriosis, an infection caused by the Listeria monocytogenes bacterium and one that poses serious risks to you and your developing baby.

Pay attention to the expiration date

Also, cream cheese isn’t known for its long shelf life. So pay attention to the expiration date or consume it within 2 weeks of purchase, whichever comes first.

Avoid sneaking a taste with your spreading knife and then going back in for more — that introduces bacteria that can grow and thrive, causing microbial contamination and making it go bad even faster.

Like many cheeses and cheese spreads, cream cheese contains a lot of fat. For example, 1 ounce of the most popular brand — Kraft Philadelphia cream cheese — has 10 grams of fat, of which 6 are saturated. This represents a whopping 29 percent of your daily recommended amount of saturated fat.

Fat isn’t the enemy when you’re pregnant — in fact, you need fat to grow a baby! But too much may increase your risk for complications like gestational diabetes.

Enjoy cream cheese as an occasional treat. There are also whipped varieties that have the same great taste but contain less fat.

Cream cheese isn’t actually a soft cheese — it’s a cheese spread made with pasteurized dairy. Because of this, it’s safe for pregnant people to consume.

Of course, always pay attention to expiration dates and ingredients when choosing what to eat, whether pregnant or not. For all stages of life, including pregnancy, it’s best to consume a nutrient-dense diet rich in whole foods like vegetables, fruits, and healthy fat and protein sources.

That being said, a little cream cheese spread over a toasted bagel may go a long way in satisfying a craving — so dig in, knowing it’s perfectly safe for you and baby.