Preheat the oven to 350F. Butter and flour 2 (9-inch) round cake pans, or lightly spray with baking spray, and line the bottoms with parchment paper.
In a large bowl, sift together the flour, baking soda, salt, and baking powder.
In a large mixing bowl or the bowl of a stand mixer with the paddle attachment, add the butter. Beat on medium speed until creamy. In a medium bowl, whisk together the cocoa powder and oil. Add to the butter along with the sugars. Beat on medium speed until very light and fluffy, about 5 minutes, stopping to scrape down the bowl a few times during mixing.
With the mixer running, add the eggs, one at a time, beating well after each addition. Stop to scrape down the bowl as needed throughout mixing. Beat in vanilla.
With the mixer on low speed, add a third of the flour mixture followed by half of the milk and half of the sour cream. Continue alternating between the flour, milk, and sour cream until combined. Scrape down the bowl. Add the hot coffee and carefully whisk together until well combined. Pour the batter into the prepared cake pans.
Bake for 40 to 45 minutes or until the cakes are starting to pull away from the sides of the pans and the center springs back when gently pressed. Let the cakes cool completely in the pans. Carefully invert the cakes and remove the parchment paper. (The cakes are very tender and delicate so be gentle.)
For the Assembly:
If desired, cut each cake layer in half horizontally, creating 4 thin rounds. Place a cake layer on a cake stand, spread about 3/4 cup of frosting over the top. Repeat with the remaining cake layers. Spread the remaining frosting all over the outside of the cake. The assembled cake can be covered and stored at room temperature for up to 5 days.
Video
Notes
If the tops of your cakes are domed, use a sharp serrated knife to cut off the domes so you can stack them. Alternatively, you can use cake strips to help your layers come out evenly. Cake strips work by keeping the outside edge of the pan cooler to ensure that the entire cake rises at the same rate, preventing a dome from forming in the middle. If you don’t want to buy cake strips, I have a post on how to DIY cake strips.
Avoid over-mixing as you risk over-developing the gluten in the batter leading to a tough, dry, and dense cake.
I highly recommend using a scale to measure your flour as it’s the most accurate method. However, if you don’t have a scale, be sure to fluff your flour with a spoon and then spoon it into your cups before leveling it off with a knife. This method is the best way to measure flour without overpacking the measuring cup.
Bring the eggs to room temperature, so they mix into the batter more effortlessly. The egg yolk breaks much easier when not cold. If you forgot to bring out your eggs, you could quickly bring them to room temperature by placing them in a large bowl and covering them with warm tap water for 5 minutes.
Don't skip sifting the cocoa powder. Sifting helps prevent lumps in the mixture when combined with the oil.
Be careful not to overbake the cake layers. You can use a toothpick and poke it into the middle of the cake to test for doneness. There should be a few crumbs clinging to your toothpick. If your toothpick is clean, you’ve overbaked the cakes.