Preheat oven to 350°F.
Prepare two 8-inch round cake pans. (Line with parchment paper, then butter and flour the pans, or spray with baking spray).
Sift the flour, sugar, cocoa, baking soda, baking powder, and salt into a bowl bowl of a stand mixer fitted with a paddle attachment and mix on low speed until combined.
In another bowl, combine the buttermilk, oil, eggs, and vanilla.
With the mixer on low speed, slowly add the wet ingredients to the dry. With mixer still on low, add the coffee (or hot water) and stir just to combine, scraping the sides and the bottom of the bowl with a rubber spatula.
Pour the batter into the prepared pans and bake for 35 to 40 minutes at 350°F, or until a cake tester comes out clean.
Cool in the pans for 30 minutes, then turn them out onto a cooling rack and cool completely.