Preheat oven to 160°C for cakes, or 180°C for cupcakes.
Line the base and sides of an 8" round cake tin with baking paper, or line two 12-hole muffin tins with cupcake papers.
Measure the boiling water in a heatproof bowl or jug and stir in the coffee. Break or chop up the dark chocolate into small pieces and add to the water and coffee, stirring until the chocolate melts. Leave to cool.
In a large bowl, sift together the flour, Xanthan gum, cocoa, baking soda and salt. In an electric mixer fitted with the paddle attachment (or in a large bowl if you are using a hand-held mixer), beat the softened butter, caster sugar, brown sugar and vanilla together on medium speed until very light and fluffy. Gradually add the eggs one at a time. The mixture may look a little curdled at this stage. Turn the mixer down to low speed and add the flour mixture and the chocolate mixture alternately, beating briefly between additions to combine. I usually spoon in the flour with one hand while pouring the chocolate mix in with the other, but you can add them alternately if you find that easier.
Scrape down the sides of the bowl, then add the sour cream and mix on low speed until just combined. Pour into the lined cake tin or cupcake papers.
Bake for 1 ¼ - 1 ½ hours for an 8” cake, or approximately 18 minutes for cupcakes. The cakes will spring back when touched lightly with a finger, and a skewer inserted into the middle will come out clean.
Cupcakes can be removed from the muffin pans straight away, but whole cakes benefit from being left to cool completely in the tin, covered with foil, overnight before turning out.
Notes
Adapted from Debbie Brown’s Dream Wedding CakesThis recipe works well either gluten-free or with wheat flour. When making it gluten free I use my favourite gluten free baking flour blend. If you want to make it with wheat flour then simply omit the Xanthan gum and use regular all-purpose flour.The gluten free version of this cake will stand up to some light carving for shaped cakes. I recommend chilling it before carving and filling and covering it in chocolate ganache before fondant for stability.