Cheese and Onion Pie: A Classic British Recipe

Updated November 24, 2026

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

Jump to recipe

Cheese and onion pie is a beloved British comfort food, featuring a rich, creamy filling of sweet, slowly cooked onions and sharp cheddar cheese, all encased in golden, flaky pastry. It’s a hearty, satisfying dish that works beautifully as a main course with mash and gravy, or as a cold picnic treat. This recipe delivers a deeply flavorful, properly seasoned pie with a crisp, buttery crust every time.

Ingredients

  • 2 tbsp (30 g) butter
  • 1 tbsp (15 ml) olive oil
  • 4 large onions (about 1.5 lb / 680 g), halved and thinly sliced
  • 1 tsp salt
  • 1/2 tsp black pepper
  • 1 tsp dried thyme (or 1 tbsp fresh)
  • 2 tbsp (16 g) all-purpose flour
  • 1 cup (240 ml) whole milk
  • 1/2 cup (120 ml) heavy cream
  • 2 cups (200 g) grated sharp cheddar cheese
  • 1 tsp Dijon mustard (optional)
  • 1 lb (450 g) shortcrust pastry (store-bought or homemade)
  • 1 egg, beaten, for egg wash

Instructions

  1. Preheat your oven to 375°F (190°C).
  2. In a large skillet or frying pan, melt the butter with the olive oil over medium heat. Add the sliced onions, salt, and pepper. Cook, stirring occasionally, for about 20-25 minutes, until the onions are soft, sweet, and lightly golden. If they start to stick, add a splash of water.
  3. Sprinkle the flour over the onions and stir for 1 minute to cook out the raw flour taste.
  4. Gradually pour in the milk and cream, stirring constantly. Bring to a gentle simmer and cook for 2-3 minutes until the sauce thickens. Remove from heat.
  5. Stir in the grated cheddar cheese and Dijon mustard (if using) until the cheese is melted and the sauce is smooth. Taste and adjust seasoning. Let the filling cool slightly while you prepare the pastry.
  6. Roll out two-thirds of the pastry on a lightly floured surface to about 1/8-inch (3 mm) thick. Line a 9-inch (23 cm) pie dish, leaving any overhang. Spoon the filling into the pastry case.
  7. Roll out the remaining pastry for the lid. Brush the edges of the bottom pastry with beaten egg, then place the lid on top. Press the edges to seal, then trim and crimp as desired. Cut a few small slits in the top to let steam escape.
  8. Brush the top of the pie with beaten egg.
  9. Place the pie on a baking sheet to catch any drips. Bake for 35-40 minutes, until the pastry is golden brown and the filling is bubbling. If the edges brown too quickly, cover them with foil.
  10. Let the pie rest for 10 minutes before slicing and serving.

Tips

  • Don’t rush the onions: The key to a sweet, mellow flavor is cooking the onions low and slow. If they brown too quickly, reduce the heat. They should be soft and jammy, not crispy.
  • Cheese choice: Sharp cheddar gives the classic flavor, but you can use a mix of cheddar and Gruyère for extra nuttiness. Avoid pre-shredded cheese as it often contains anti-caking agents that can make the sauce grainy.
  • Pastry handling: Keep the pastry cold. If it becomes too soft to handle, chill it in the fridge for 15 minutes. For a shiny, golden top, brush with egg wash just before baking.
  • No soggy bottom: To prevent a soggy bottom crust, you can blind-bake the pastry base for 10 minutes before adding the filling. This is especially helpful if you prefer a very crisp crust.

Serving Suggestions

Serve this pie hot with creamy mashed potatoes, steamed green vegetables like peas or broccoli, and a generous spoonful of rich gravy. It also makes a fantastic cold lunch, sliced and served with a simple salad and pickles.

Variations

  • Add potato: Add 1 cup of cooked, diced potatoes to the filling for a heartier pie.
  • Herby twist: Stir in a handful of chopped fresh parsley or chives at the end.
  • Leek and onion: Replace half the onions with leeks for a milder, sweeter flavor.
  • Puff pastry top: For a flakier top, use puff pastry for the lid instead of shortcrust. Bake as directed, but watch carefully as puff pastry may brown faster.
  • Vegan version: Use plant-based butter, milk, cream, and a good melting vegan cheddar. The rest of the recipe remains the same.

Storage and Reheating

Store leftover pie in the refrigerator within 2 hours of baking. It will keep for up to 3-4 days. To reheat, place slices in a preheated oven at 350°F (175°C) for 10-15 minutes, or until heated through. You can also microwave individual slices, but the pastry will be less crisp. The pie can be frozen for up to 3 months; thaw overnight in the fridge before reheating.

Frequently Asked Questions

Can I make this pie ahead of time? Yes, you can assemble the pie completely, cover it, 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.

Why is my filling runny? This usually happens if the onions weren’t cooked down enough, or if the sauce wasn’t thickened sufficiently before baking. Make sure to cook the onions until they release their moisture and the sauce is thick enough to coat the back of a spoon.

Can I use a different type of onion? Absolutely. Yellow or brown onions are classic, but red onions or a mix can work well. They may have a slightly different flavor and sweetness.

Do I need to blind-bake the pastry? Not strictly, but it helps prevent a soggy bottom, especially if you like a very crisp crust. If you skip it, just make sure the filling isn’t too wet.

Can I use ready-made pastry? Yes, store-bought shortcrust pastry works perfectly. Just follow the package instructions for rolling and baking, and ensure it’s properly chilled before using.

What if I don’t have Dijon mustard? You can omit it, or use a pinch of English mustard powder. It adds a subtle tang that complements the cheese, but it’s not essential.

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