There's a particular kind of dread that sets in when you've been asked to bake a celebration cake for someone who can't tolerate gluten or dairy. You know the feeling—that quiet, low-grade anxiety about whether the sponge will be gummy in the middle, whether it will crumble the moment you try to lift it, whether the whole thing will taste like a well-intentioned compromise rather than an actual cake worth celebrating over.
That anxiety is completely understandable. But here's the thing: it's almost entirely misdirected.
The real question—the one that actually leads somewhere useful—is not "how do I make a cake without gluten and dairy?" It's "what are gluten and dairy actually doing inside a cake, and what genuinely replaces those functions when I remove them?" Answer that question properly, and the anxiety dissolves. Not because gluten-free, dairy-free baking becomes easy, but because it becomes logical. And logical problems have logical solutions.
Most baking content skips straight to the recipe without answering it. The result is a generation of home bakers making hopeful substitutions, getting inconsistent results, and concluding that gluten-free cake is simply an inferior experience. It doesn't have to be—but getting there requires understanding what's happening structurally and chemically before you ever open a bag of flour.
What Gluten Is Actually Doing Inside Your Cake
Gluten isn't an ingredient you add to a recipe—it's a protein network that forms spontaneously when wheat flour meets water. Two proteins naturally present in wheat (glutenin and gliadin) hydrate and bond together under mechanical action, creating a web of varying strength depending on how much you mix and what type of flour you use. In bread, you want this network strong and elastic. In cake, you keep it deliberately weak—but it's still doing real, irreplaceable structural work.
Specifically, gluten performs three jobs at the same time:
- Trapping gas: Carbon dioxide produced by your leavening agents needs something to push against. Gluten strands form the scaffolding that holds these bubbles in place, which is what makes a cake rise rather than simply bubble and collapse back on itself.
- Setting the structure: As the temperature inside the cake rises during baking, gluten proteins denature—they unfold and form new bonds—creating a solid framework that holds the crumb in shape as the cake cools. This is why a cake can look perfect coming out of the oven and still sink if that framework hasn't properly set.
- Managing moisture: Gluten proteins absorb and hold water within the batter, influencing both the texture of the finished crumb and how long the cake stays fresh after baking.
Remove gluten, and you lose all three of these functions simultaneously. This is the fundamental reason why a simple one-to-one flour swap almost never works without further adjustment—you haven't replaced one thing, you've created three separate structural problems that each need their own solution.
What Dairy Is Actually Doing Inside Your Cake
Dairy does even more than gluten, and it does it through several entirely different mechanisms at once. This is worth slowing down on, because it's where the most useful insight lives.
When a recipe calls for butter, it isn't simply adding richness. It's physically coating flour proteins and starch granules to create tenderness, carrying fat-soluble flavour compounds that would otherwise not develop, and—when creamed with sugar—trapping tiny air bubbles that contribute to lift before the batter even reaches the oven. When a recipe calls for milk, it's hydrating dry ingredients, activating leavening agents, and contributing lactose, a sugar that participates in the browning reaction responsible for the golden exterior and caramelised depth of flavour on a finished cake. When buttermilk appears in a recipe, its acidity reacts chemically with bicarbonate of soda to produce a rapid release of carbon dioxide, creating lift while simultaneously tenderising the crumb.
The honest count of what you're removing when you take out dairy looks something like this:
- Fat structure and air-trapping capacity
- Liquid hydration and batter viscosity
- Acidic chemistry for leavening and tenderising
- Browning chemistry for colour and flavour development
- Fat-soluble flavour complexity
That's five distinct functional properties, not one. And this reframes the entire challenge. When a gluten-free, dairy-free cake fails, it rarely fails for a single reason—it fails because multiple structural and chemical functions have been removed and not adequately replaced. Understanding each function individually is what allows you to address each one deliberately. That's the difference between a good gluten-free cake and a genuinely great one.
Building Your Flour Blend: What Each Option Actually Brings
The single most consequential decision in any gluten-free cake is the flour—or more accurately, the flour blend. No individual gluten-free flour does everything wheat flour does, but understanding the functional profile of each one allows you to build a blend that comes remarkably close. At Quay Naturals, this principle of deliberate, purposeful blending sits at the core of how ingredients are formulated—clean, honest components chosen for what they genuinely contribute, not for convenience or cost-cutting.
Teff Flour
Teff is one of the oldest cultivated grains in the world, originating in the Horn of Africa where it has sustained communities for millennia. In a gluten-free baking context, it's one of the most compositionally interesting options available. With approximately 11–13% protein—higher than most gluten-free alternatives—it contributes meaningful structural support alongside a strong micronutrient profile including iron, calcium, and resistant starch. Its fine particle size integrates smoothly into batters, avoiding the gritty texture that can undermine other gluten-free flours. Its mild earthiness works beautifully in chocolate cakes, spiced loaves, and carrot cakes.
The resistant starch in teff is worth noting specifically for anyone going gluten-free for medical reasons. Resistant starch feeds beneficial bacteria in the large intestine, supporting gut microbiome health—a genuinely relevant consideration for people with coeliac disease, whose gut ecology is often disrupted and actively needs support.
Buckwheat Flour
Despite the name, buckwheat has no relationship to wheat whatsoever. It's a seed, botanically speaking, and it's completely gluten-free. Its protein content sits around 13%, making it structurally capable in a cake context, and it contains rutin—a flavonoid with anti-inflammatory properties—alongside meaningful quantities of magnesium and B vitamins. Its distinctive, slightly nutty bitterness pairs exceptionally well with dark chocolate, stone fruits, and recipes using natural sweeteners. One important technical note: buckwheat absorbs moisture aggressively, so recipes using it as a primary flour typically need either a slightly higher liquid ratio or a shorter resting time before baking.
Cassava Flour
Made from the whole dried and ground cassava root—which is distinct from tapioca starch, which is only the isolated starch component—cassava flour has a neutral flavour and fine texture that make it one of the most versatile gluten-free options. Its starches gelatinise at relatively low temperatures, contributing to a cohesive crumb. Its protein content is limited, however, which means it contributes minimally to structural integrity on its own. It works best as a base flour combined with something protein-richer, like teff or buckwheat, rather than as a standalone solution.
Almond Flour
Almond flour operates on a fundamentally different principle to grain-based flours, and this distinction matters enormously in a dairy-free context. With approximately 21% protein and around 50% fat—predominantly monounsaturated oleic acid—almond flour doesn't need additional dairy fat to produce a tender, moist crumb. The fat is already there, inherent to the ingredient. This means that cakes built primarily on almond flour aren't dairy-free by compromise. They're dairy-free by the natural logic of the ingredient itself.
The Role of Starches
A well-formulated gluten-free flour blend almost always includes one or two starches alongside the primary flour, and this isn't incidental—each starch serves a specific, irreplaceable function:
- Tapioca starch creates chewiness and stretch, counteracting the crumbliness that is the most common failure mode in gluten-free baking.
- Arrowroot is a clean-label, flavour-neutral option that binds effectively and produces a lighter crumb than heavier starches.
- Potato starch is highly hygroscopic—it attracts and holds water—contributing moisture retention and a tender, soft crumb texture.
Replacing Dairy: A Functional Breakdown
Replacing the Fat
Refined coconut oil is the most functionally comparable plant-based replacement for butter in cake. At room temperature it's semi-solid, which means it can be creamed with sugar to trap air in the same way butter does. Its melting point is close enough to butter's that it behaves comparably during baking. Refined coconut oil is flavour-neutral; unrefined retains a mild coconut note that can be either a pleasant feature or a consideration depending on your recipe. It's also rich in medium-chain triglycerides (MCTs), which follow a different metabolic pathway to long-chain saturated fats—though as with most nutritional science, context and moderation are always relevant.
Replacing the Liquid
Full-fat tinned coconut milk is the richest plant-based liquid option and the one that most closely mimics the behaviour of whole dairy milk in a cake. Its high fat content contributes structural moisture and participates in browning reactions similarly to dairy. Certified gluten-free oat milk contains beta-glucans—naturally occurring soluble fibres that slightly increase batter viscosity, which can be an advantage in recipes prone to spreading. Almond milk is the lightest of the three, most similar functionally to skimmed dairy milk, and works well in sponge cakes and lighter-crumbed recipes.
Replacing Buttermilk's Acidity
This is one of the simplest and most effective functional replacements in the entire gluten-free, dairy-free toolkit. Add a tablespoon of apple cider vinegar or fresh lemon juice to your plant-based milk, give it a brief stir, and leave it for five minutes. The resulting mixture functions as a direct buttermilk replacement because the chemistry is identical—the acid reacts with bicarbonate of soda to produce carbon dioxide for lift, and the slight protein changes in the plant milk mimic buttermilk's tenderising effect. The dairy origin of the acidity is entirely irrelevant to the chemical reaction.
Solving the Browning Problem
Lactose in dairy milk participates in the Maillard browning reaction that gives conventional cake its deep golden exterior and complex caramelised flavour. Most plant milks have lower sugar content, which can result in a noticeably paler cake. The clean-label solutions are straightforward:
- Use coconut sugar in the batter—it caramelises more readily than refined white sugar and adds a gentle toffee-like depth.
- Brush the surface with a small amount of maple syrup before baking.
- Incorporate full-fat coconut milk into the batter, as its natural sugars brown reliably at standard baking temperatures.
The Binding Question: Eggs, Flax, and Aquafaba
In a conventional cake, eggs function simultaneously as emulsifiers, leavening agents, structural proteins, and moisture contributors. In a gluten-free context, their binding role becomes even more critical—there's no gluten network providing the cohesion that holds the crumb together, so the eggs are carrying more structural weight than usual. For recipes that also need to be egg-free, the options are:
- Flaxseed meal: One tablespoon of ground flaxseed combined with three tablespoons of water, left for five minutes to form a gel. It binds through mucilage polysaccharides and contributes omega-3 fatty acids in the form of ALA. Works best in denser cakes where its mild nuttiness integrates naturally.
- Aquafaba: The liquid from a tin of cooked chickpeas. Three tablespoons equals one egg white. Whipped, it creates genuine foam that holds its structure—making it particularly useful in lighter cakes where volume from beaten eggs is part of the method. Its functional similarity to egg white comes from a combination of proteins, starches, and saponins.
- Psyllium husk powder: One teaspoon forms a strong gel when hydrated and provides some of the most impressive structural binding available in gluten-free baking. It also contributes significant soluble fibre—an important consideration for digestive health, particularly for those who have removed gluten for medical reasons.
Two Recipes Built from First Principles
The following recipes aren't simply lists of ingredients—they're demonstrations of the functional reasoning explored above. Understanding why each ingredient is there makes you a more adaptable, confident baker, one who can troubleshoot intuitively rather than following instructions blindly.
Teff and Dark Chocolate Layer Cake
This recipe leverages teff's protein content for structural integrity, tapioca starch for binding and cohesion, coconut oil for fat structure and air-trapping, and full-fat coconut milk for the richness that dairy would ordinarily provide. The apple cider vinegar activates the bicarbonate of soda for lift, and the hot water enhances cacao flavour release while adjusting the batter to the correct consistency.
For the cake layers:
- 180g teff flour
- 60g tapioca starch
- 40g arrowroot starch
- 50g raw cacao powder
- 200g coconut sugar
- 1½ tsp bicarbonate of soda
- 1 tsp aluminium-free baking powder
- ½ tsp fine sea salt
- 240ml full-fat coconut milk
- 1 tbsp apple cider vinegar (stir into the coconut milk 5 minutes before mixing)
- 3 large eggs, or 3 flax eggs for a fully vegan version
- 120ml refined coconut oil, melted and cooled to room temperature
- 2 tsp pure vanilla extract
- 180ml hot water
Method:
- Preheat your oven to 175°C and line two 20cm round cake tins.
- Whisk all dry ingredients together in a large bowl until evenly combined. Even distribution of leavening agents is particularly important in gluten-free baking, where the structure is more fragile than in conventional cakes.
- In a separate bowl, combine all wet ingredients including the coconut milk and vinegar mixture.
- Pour the wet ingredients into the dry and mix until just combined. Do not overmix—even without gluten, excessive mixing can cause premature starch gelatinisation, resulting in a dense or gluey crumb.
- Divide evenly between the prepared tins and bake for 30–34 minutes, until a skewer inserted in the centre comes out clean.
- Allow to cool completely in the tins before turning out. Gluten-free cakes are more fragile when warm.
For the dairy-free frosting: Refrigerate two tins of full-fat coconut cream overnight without shaking. Scoop out