This cheese and onion pie filling is a classic British comfort food—a rich, savory mixture of slowly caramelized onions, sharp cheddar, and a creamy, egg-enriched sauce that bakes into a golden, satisfying pie. It works beautifully because the sweetness of the onions balances the tangy cheese, while the simple sauce keeps everything moist and cohesive. Whether you use it in a shortcrust pastry pie, a puff pastry turnover, or even as a baked potato topping, this filling is genuinely versatile and deeply flavorful.
Ingredients
- 3 large onions (about 1 lb / 450 g), thinly sliced
- 2 tbsp (30 g) unsalted butter
- 1 tbsp (15 ml) olive oil
- 1 tsp (5 g) salt, plus more to taste
- 1/2 tsp (1 g) black pepper
- 1/2 tsp (1 g) dried thyme (optional)
- 3 tbsp (24 g) all-purpose flour
- 1 1/4 cups (300 ml) whole milk, warmed
- 2 cups (200 g) grated sharp cheddar cheese
- 1/2 cup (50 g) grated Parmesan cheese
- 1 tsp (5 g) Dijon mustard
- 1 large egg, beaten (for the sauce)
- 1 egg yolk, beaten (for glazing the pastry, optional)
Instructions
- In a large skillet or sauté pan, melt the butter with the olive oil over medium heat. Add the sliced onions, salt, pepper, and thyme if using. Cook, stirring occasionally, for 20–25 minutes, until the onions are soft, golden, and lightly caramelized. Reduce heat if they start to brown too quickly. Remove from heat and set aside.
- While the onions cook, preheat your oven to 375°F (190°C) if you are baking a pie immediately. If you are making the filling ahead, you can skip preheating.
- Sprinkle the flour over the cooked onions and stir well to coat. Cook for 1–2 minutes over medium heat to remove the raw flour taste.
- Gradually pour in the warm milk, stirring constantly to avoid lumps. Bring the mixture to a gentle simmer; it will thicken into a sauce. Cook for 2–3 minutes until it coats the back of a spoon.
- Remove the pan from the heat. Stir in the grated cheddar and Parmesan, plus the Dijon mustard, until the cheeses melt into a smooth sauce. Taste and adjust salt and pepper.
- Let the mixture cool for 5–10 minutes. Then stir in the beaten egg. This enriches the filling and helps it set when baked. Do not add the egg while the mixture is too hot, or it will scramble.
- Pour the filling into your prepared pie crust (see tips for blind baking). Smooth the top. If desired, brush the edges of the pastry with the beaten egg yolk for a golden finish.
- Bake at 375°F (190°C) for 30–35 minutes, until the filling is set in the center and the top is golden brown. If the crust edges brown too quickly, cover them with foil or a pie shield.
- Let the pie rest for 10 minutes before slicing. This allows the filling to firm up and makes clean slices easier.
Tips
- Caramelize properly: Don’t rush the onions. Low and slow is key—if they brown too fast, they’ll be bitter. A heavy-bottomed pan helps prevent burning.
- Blind bake your crust: For a crisp bottom crust, blind bake it for 15 minutes at 375°F (190°C) with pie weights or dried beans, then remove the weights and bake for 5 more minutes before filling. This prevents a soggy bottom.
- Substitutions: Use any good melting cheese like Gruyère, Gouda, or a mature white cheddar. For a stronger flavor, add a tablespoon of grated onion or a pinch of nutmeg.
- Watch the egg: If you skip the egg, the filling will be more like a sauce and less set. If you’re vegan, you can omit the egg and add 2 tbsp (16 g) of cornstarch dissolved in 2 tbsp (30 ml) of cold water to the milk to help thicken.
Serving Suggestions
Serve this pie hot with a side of steamed green beans, a crisp green salad, or roasted potatoes. It’s also excellent with a dollop of chutney or pickled onions for a tangy contrast. For a hearty meal, pair it with a bowl of tomato soup.
Variations
- Add vegetables: Sauté 1 cup (150 g) of sliced mushrooms or a handful of spinach with the onions for extra bulk and flavor.
- Herb twist: Stir in 1 tbsp (15 g) of fresh chopped chives or parsley at the end.
- Spicy kick: Add 1/2 tsp (1 g) of smoked paprika or a pinch of cayenne pepper to the sauce.
- Swap the cheese: Use a blue cheese like Stilton for a sharper, more pungent filling.
Storage and Reheating
Refrigerate any leftover pie within 2 hours of baking. It will keep for 3–4 days in the fridge. To reheat, place slices in a 350°F (175°C) oven for 10–15 minutes, or until warmed through. You can also microwave individual slices for 1–2 minutes, but the crust won’t be as crisp. The filling can also be frozen (without the pastry) in an airtight container for up to 3 months. Thaw overnight in the fridge before using.
Frequently Asked Questions
Can I use pre-shredded cheese? Yes, but pre-shredded cheese often contains anti-caking agents that can make the sauce grainy. For the smoothest result, grate your own cheese from a block.
Why is my filling runny? This usually happens if the onions weren’t cooked long enough to release their moisture, or if the sauce wasn’t thickened enough before adding the cheese. Make sure the sauce coats a spoon before adding the egg, and let the pie rest after baking.
Can I make this filling ahead of time? Absolutely. Prepare the filling, let it cool completely, and refrigerate for up to 2 days. When ready to bake, pour it into the crust and add 5–10 minutes to the baking time to compensate for the cold filling.
Can I use this filling in a puff pastry pie? Yes, it works great. Use a puff pastry top and bottom, but note that puff pastry needs a hotter oven (400°F / 200°C) and you may need to reduce the baking time to 25–30 minutes. Keep an eye on it to prevent burning.
Do I have to blind bake the crust? Not strictly, but it helps prevent a soggy bottom, especially if you like a crisp crust. If you skip it, bake the pie on a lower oven rack and consider brushing the bottom crust with a little beaten egg white before filling.
Can I make this without eggs? Yes, omit the beaten egg and increase the flour to 4 tbsp (32 g) to help the filling set. The texture will be slightly less firm but still delicious.
Related
- Stick of Butter Chicken and Rice: Easy One-Pot
- Air Fried Bread: Easy Homemade Recipe
- Air Fryer Garlic Bread: Quick & Crispy Recipe
More recipes to cook
Safety notes: safe minimum internal temperatures from USDA FSIS; raw and undercooked fish guidance from the U.S. FDA. Food safety notes
Spotted an error? Tell us and we will correct it (corrections policy).