Good Food Cheese and Onion Pie Recipe

Updated November 25, 2026

Total time
1 hr 45 min
prep 30 min · cook 1 hr 15 min
Serves
6
portions as written

Jump to recipe

This cheese and onion pie is a hearty British classic, featuring a rich, savory filling of slowly caramelized onions and plenty of mature cheddar cheese, all encased in a golden, buttery shortcrust pastry. It works because the sweetness of the onions balances the sharpness of the cheese, creating a deeply comforting and satisfying dish that is perfect for a family dinner or a weekend lunch.

Ingredients

  • For the pastry:
    • 2 ½ cups (315 g) all-purpose flour, plus extra for rolling
    • ½ teaspoon salt
    • 1 cup (225 g) cold unsalted butter, cut into small cubes
    • 1 large egg yolk
    • 4–5 tablespoons (60–75 ml) ice-cold water
  • For the filling:
    • 3 tablespoons (45 g) unsalted butter
    • 4 large onions (about 1.5 lb / 680 g), thinly sliced
    • 1 teaspoon salt
    • ½ teaspoon black pepper
    • 1 teaspoon dried thyme (or 1 tablespoon fresh)
    • 2 tablespoons (16 g) all-purpose flour
    • 1 cup (240 ml) whole milk
    • 2 cups (200 g) grated mature cheddar cheese (sharp cheddar)
    • 1 teaspoon Dijon mustard (optional)
    • 1 large egg, beaten, for egg wash

Instructions

  1. Make the pastry: In a large bowl, mix the flour and salt. Add the cold butter cubes and rub them into the flour with your fingertips until the mixture resembles coarse breadcrumbs. (Alternatively, pulse in a food processor.)
  2. Add the egg yolk and 4 tablespoons of ice-cold water. Mix with a fork until the dough just comes together. If it seems dry, add the remaining tablespoon of water. Turn out onto a lightly floured surface, knead gently for a few seconds, then shape into a disk. Wrap in plastic wrap and refrigerate for at least 30 minutes.
  3. Cook the onions: While the pastry chills, melt the 3 tablespoons of butter in a large skillet or saucepan over medium heat. Add the sliced onions, salt, pepper, and thyme. Cook, stirring occasionally, for 20–25 minutes, until the onions are soft, sweet, and lightly golden. Do not rush this step; low and slow is key.
  4. Sprinkle the flour over the cooked onions and stir for 1 minute. Gradually pour in the milk, stirring constantly, until the mixture thickens into a sauce. Cook for 2–3 minutes, then remove from heat.
  5. Stir in the grated cheddar cheese and Dijon mustard (if using) until the cheese melts into a thick, creamy filling. Taste and adjust seasoning. Let the filling cool completely (you can speed this up by spreading it on a plate).
  6. Preheat the oven to 400°F (200°C). Place a baking sheet in the oven to preheat as well (this helps catch any drips and ensures a crisp bottom crust).
  7. Roll out the pastry: On a lightly floured surface, roll out two-thirds of the pastry to about 1/8-inch (3 mm) thick. Line a 9-inch (23 cm) pie dish with it, leaving any overhang. Roll out the remaining pastry for the lid.
  8. Pour the cooled cheese and onion filling into the pie crust, spreading it evenly. Brush the edges of the bottom pastry with a little beaten egg. Place the lid on top, press the edges to seal, and trim off excess. Crimp the edges with a fork or your fingers. Cut 3–4 small slits in the top to allow steam to escape.
  9. Brush the top of the pie with the beaten egg for a golden shine. Place the pie on the preheated baking sheet.
  10. Bake for 30–35 minutes, until the pastry is deep golden brown and the filling is bubbling. If the edges brown too quickly, cover them loosely with foil.
  11. Let the pie rest for 10 minutes before slicing. This helps the filling set and makes serving easier.

Tips

  • Don’t rush the onions: The flavor of this pie depends on thoroughly caramelized onions. If they are undercooked, they will be sharp and crunchy. Give them at least 20 minutes over medium heat.
  • Cool the filling before assembling: A hot filling will melt the pastry and make it soggy. Always let the cheese and onion mixture cool completely before adding it to the pie crust.
  • Use a sharp cheddar: Mature or extra-mature cheddar gives the strongest cheese flavor. Mild cheddar will result in a blander pie.
  • Blind bake if you prefer a crisp bottom: If you want an extra-crispy bottom crust, you can blind bake the bottom pastry for 15 minutes with pie weights before adding the filling, then bake the assembled pie as directed.

Serving Suggestions

Serve this pie warm, sliced into wedges, with a side of steamed green vegetables such as broccoli or peas, and a generous spoonful of gravy or a simple tomato chutney. It also pairs beautifully with a fresh green salad and boiled new potatoes for a lighter meal.

Variations

  • Add potato: Layer thin slices of cooked potato under the cheese and onion filling for a more substantial pie.
  • Use leeks: Replace half of the onions with sliced leeks for a milder, slightly sweeter flavor.
  • Add herbs: Stir in a handful of chopped fresh parsley or chives along with the cheese.
  • Make it puff pastry: For a quicker version, use store-bought puff pastry for the lid only, and keep the shortcrust for the base.

Storage and Reheating

Store leftover pie in the refrigerator, covered, for up to 3 days. To reheat, place slices in a preheated oven at 350°F (175°C) for 15–20 minutes, or until hot throughout. You can also microwave individual slices for 1–2 minutes, but the pastry will be less crisp. The pie can be frozen (baked or unbaked) for up to 2 months; thaw overnight in the refrigerator before reheating or baking.

Frequently Asked Questions

Can I use pre-made pastry? Yes, store-bought shortcrust pastry works well and saves time. You’ll need about 1 lb (450 g) for a 9-inch pie.

Why is my pie soggy? A soggy bottom usually happens when the filling is too wet or the pastry isn’t baked long enough. Make sure to cook the onions until they release most of their moisture, and cool the filling completely before assembling. Baking on a preheated sheet also helps.

Can I make this pie ahead of time? Absolutely. Assemble the pie (without egg wash) and refrigerate for up to 24 hours before baking. You may need to add 5–10 minutes to the baking time if baking from cold.

Can I use a different cheese? Yes, Gruyère, Swiss, or a mix of cheddar and Parmesan work well. Avoid overly oily cheeses like mozzarella.

How do I prevent the pastry from shrinking? Make sure your pastry is well-chilled before rolling and baking. Also, avoid stretching the dough when lining the pie dish; gently press it into the corners.

Is this pie suitable for vegetarians? Yes, this recipe is completely vegetarian as long as you use a vegetarian-friendly cheddar (some rennet is animal-derived).

Related

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).