Preheat the oven to 350 degrees Fahrenheit. Butter two 8-inch round cake pans. Line the bottoms with parchment paper.
Whisk the flour, sugar, cocoa, baking soda, baking powder, and salt in a mixing bowl or into the bowl of a stand mixer fitted with the paddle attachment. Mix until combined.
Combine the buttermilk, oil, eggs, and vanilla in a separate mixing bowl.
Slowly add the wet ingredients to the dry ingredients. Next, add the coffee and stir with a spatula until combined.
Divide the batter evenly between the two prepared pans and bake for 35 to 40 minutes, or until a toothpick or skewer comes out clean.
Allow the cakes to cool in the pans for about 30 minutes, then turn them out onto a cooling rack to cool completely before frosting.