I used to think that a strict diet meant pricey grocery runs. Then, my health forced me to go gluten-, dairy-, and sugar-free as a full-time student on a budget.

As a freshman in college, I was diagnosed with a modern mutation of the bubonic plague (yes, really), which I had contracted while backpacking in Central Asia the year prior.

An extremely rare illness, it’s likely I picked it up from bad food. Luckily, the bacteria itself wasn’t difficult to treat, and I only had to take a simple course of antibiotics. After a year of symptoms, though, my upper digestive system was in rough shape.

Healing would require a very strict diet.

I needed to completely eliminate irritants for as long as it took to fully recuperate — which turned out to be two years!

Wheat, dairy, processed sugar, acidic foods, caffeine, and alcohol were all off the (kitchen) table. Plus, I had been a vegetarian for more than five years, so that narrowed down my options even more.

Buying an overpriced gluten-free label is not smart when you can find cheaper substitutes that work for your diet.

I expected that sticking to this diet would cost me a pretty penny – it seemed like the more ingredients a company took out of a food, the more expensive it became! As a college freshman on a student budget, I knew I needed to cut costs wherever possible. Luckily, I didn’t need to factor alcohol into my expenses – typically a significant drain on a college student’s budget.

Managing severe dietary restrictions on a budget was tough, but I made it work. If you’re thinking of going gluten-free or you have to make changes to your diet for health reasons, you don’t have to blow your budget.

This App Makes Managing Your Finances Easy — Start Budgeting Today >>

Shop at Regular Grocery Stores

Unlike organic and specialty groceries, regular stores won’t mark up their entire inventory. I quickly learned that shopping exclusively at Whole Foods meant a very boring diet because I had to stick to the basics to stay within budget. But when I started shopping at Trader Joe’s and other cheaper stores, I could afford to have some fun groceries!

Tip: Big chains often have aisles dedicated to special diets, especially gluten-free options.

Don’t Write Off Regular Foods

When I couldn’t eat sugar, I assumed I would have to cut out my favorite tomato sauce and vegetable dumplings — until I took a minute to read their ingredient lists. They turned out to be sugar-free!Processed foods (including some of your favorites) may surprise you.

Not every gluten- or dairy-free product is labeled, so it’s always worth reading ingredient lists. Even some prepared foods will likely fit your diet.

Tip: You can research ingredient lists on many food companies’ websites. That way you don’t have to stand in the grocery aisle reading the fine print on canned soup and salad dressing.

Get Food, Drinks, and Groceries — Anytime, Anywhere >>

Choose Dishes that Don’t Typically Include Allergens

Just because you’re gluten-free doesn’t mean you have to order pricey gluten-free pancakes or buy expensive wheat-free bagels.

You can choose to eat regular meals that don’t normally contain gluten anyway (or whichever ingredient you’re excluding from your diet). Instead of gluten-free pancakes, eat eggs for breakfast. Instead of asking for overpriced Tofutti on your bagel, ask for peanut butter. Avoiding foods catered toward special diets will make maintaining a strict diet much cheaper.

Tip: Find an international cuisine that fits your diet. Mexican, Thai, and Indian dishes often don’t contain much gluten, and a lot of East Asian dishes are dairy-free. These meals won’t require much modification, at home or in restaurants.

This App Makes Managing Your Finances Easy — Start Budgeting Today >>

Consider Cheaper Substitutes

You don’t have to buy the expensive substitute ingredients marketed for “fancy diets.” The burgeoning gluten-free industry means that there are lots of clearly labeled options. But many products are still quite expensive – sometimes two to three times as much as their “regular” counterparts. Lots of naturally gluten-free flours (e.g. rice flour) will work just as well as that “gluten-free baking flour” featured in the specialty aisle of your grocery store.

Tip: Google “_____ gluten/dairy/sugar-free substitutes” for comprehensive lists of options.

Buy Expensive or Unusual Ingredients in Bulk Online

You don’t need a Costco or Sam’s Club membership to take advantage of deals (although they can be a great way to save). Online marketplaces offer specialty diet ingredients at a fraction of the cost, and you can purchase the items in bulk at a discount. If you eat a lot of sugar-free applesauce, see if you can order a pack online to cut costs.

Pack Your Own Snacks

I wasted so much money picking up snacks outside of my house or grocery store. Slap a “gluten-free” label on a power bar or bag of chips, and the price goes up by 50 percent.

Eventually, I started making my own granola bars and bringing baggies of fruit and peanut butter with me when I went out. Alternatively, you can buy snacks in bulk to avoid retail markup.

Tip: Research which “regular” snacks fit your diet so that you have some cheap backup options in case you forget to pack your own.