Step 1: Prepare the Ingredients
Preheat the oven to 350°F (175°C).
Grease and line a 9-inch round cake pan (or a 9x13-inch pan for a sheet cake).
Sift together the gluten-free flour, cocoa powder, baking soda, baking powder, and salt in a mixing bowl.
Step 2: Mix the Batter
In a separate bowl, whisk together sugar, eggs (or flax eggs), oil, and vanilla extract.
Add buttermilk (or dairy-free alternative) and mix until smooth.
Gradually add the dry ingredients to the wet ingredients, stirring gently.
Pour in hot water or brewed coffee, mixing just until combined. Do not overmix.
Step 3: Bake the Cake
Pour the batter into the prepared pan and smooth the top.
Bake for 30–35 minutes, or until a toothpick inserted in the center comes out clean.
Step 4: Cool the Cake
Let the cake cool in the pan for 10–15 minutes, then transfer to a wire rack.
Allow the cake to cool completely before frosting.