When your stomach hurts or you feel like you might throw up, the last thing you want to do is eat something that makes it worse. It can be even harder to know what to try if you’ve been vomiting or have diarrhea. But some foods can give you nutrients you need without making you feel worse

Start With Liquids

If you can’t keep solid food down, there’s no point in trying to eat. Things like sports drinks, clear broth, or coconut water have minerals you need like potassium, calcium, and sodium (salt).

Try: Bananas

They’re easy to digest and have lots of potassium — an important mineral you may start to lose if you have diarrhea or have been vomiting.

Try: Rice

Make sure it’s plain white rice. Wild, brown, or black rice — generally healthy — are harder to digest, especially on an upset stomach. Starchy, low-fiber foods like white rice also can help firm up your stool and stop the diarrhea that can come along with stomach trouble.

Try: Applesauce

It’s easy to digest and has plenty of nutrients, including pectin — a kind of fiber that dissolves in water. It can add bulk to your stool and help get rid of your diarrhea.

Try: Toast

Simple white-bread toast is better than fiber-rich whole grains when you have an upset stomach. Whole grain has a kind of fiber that’s good when you’re not sick, but it can make an unhappy tummy worse, especially if you have diarrhea or nausea.

Next Steps

If those foods stay down, you can start to branch out to things like baked potatoes and maybe some boneless, skinless chicken breast. Once you’re feeling better and haven’t thrown up or had diarrhea in 24 to 48 hours, you can try to add in some fruits and vegetables.

Don’t Eat: Dairy

Milk, cheese, and ice cream are all no-no’s with an upset stomach. They’re hard for your body to digest, in part because they’re high in fat. Plain, nonfat yogurt may be OK sometimes, but start with a little and see how it goes.

Don’t Eat: Fried Foods

These have lots of oil and fat, so they’re harder to digest. Fried foods aren’t great for you even when you’re healthy, but they can make an already upset stomach even worse.

Don’t Drink: Soda

The bubbles can be a problem, because gas gets into your digestive system. And if lots of sugar hits you all at once, it can make diarrhea worse — there’s no quicker way to get sugar into your bloodstream than to drink it. Small sips of a flat soda may be OK.

Don’t Eat: Spicy Food

It’s probably the last thing you feel like having with an upset stomach — and there’s a reason for that. Your digestive system may have to work harder to digest it, and that can make your rumbly tummy worse. Stick to the bland stuff until you feel better.

Don’t Eat: Raw Fruits and Vegetables

They’re great when you’re healthy. But when you have an upset stomach, the fiber in them — which normally makes your poop easy to pass — can make things worse. It’s best to wait until you feel better to add them back into your diet. Start with small portions of cooked vegetables and juices.

Keep Your Tummy Happy

A balanced diet with plenty of fruits and vegetables can help keep your digestive system healthy and your immune system strong and ready to fight off bugs that might upset your stomach. And watch for triggers — anything from foods that have acid like tomatoes, to fizzy drinks, to stress at work.