1. Preheat the oven to 350 degrees Fahrenheit. Coat a nine- by 13-inch baking pan with cooking spray or oil and dust with cocoa powder. Or spray or oil two round layer cake pans, line the bottoms with parchment paper, spray or oil the paper, and dust with cocoa powder.
2. Mix together white and brown rice flours, potato starch, and tapioca starch. (See note for other flour options.)
3. In a medium bowl, stir together the cocoa, flour mixture, xanthan gum, sugar, salt, and baking soda. Add the vegetable oil, hot water or coffee, and vanilla, and using an electric mixer or a whisk, mix well until thick and smooth with no lumps. Add the vinegar and stir briefly, just until the batter is evenly colored. Without wasting any time, scrape the batter into the prepared baking pan(s).
4. Bake in a nine- by 13-inch pan for about 45 minutes; round cake pans for 35 to 40 minutes. Turn the pan midway if your oven heats unevenly. When the top feels springy and the cake pulls away slightly from the sides, remove from the oven. Cool on a wire rack.
Variations:
In place of the white and brown rice flours, potato starch, and tapioca starch you can use three cups of a commercial gluten-free flour mix, such as Bob’s Red Mill. If you want to use wheat flour, use three cups and omit the xanthan gum.