Preheat oven to 350°F. Grease an 8x8-inch baking pan.
In a large bowl, mix together flour, sugar, cocoa powder, baking powder, baking soda, and salt.
Add butter, eggs, vanilla extract, and hot water. Beat until smooth, about 1 minute, scraping sides as needed.
Pour batter into prepared pan and bake for 45 minutes or until a toothpick comes out clean.
Let cool for 5 minutes, then transfer onto a wire rack to cool completely before frosting.
For frosting: Melt butter in microwave or saucepan on stove. Transfer butter to a bowl and mix in powdered sugar, cocoa powder, milk, and vanilla. Stir until smooth. Add a splash more milk if needed until you reach desired consistency.
Spread frosting over cooled cake. Slice and serve.
Recipe Notes:
Always sift cocoa powder to avoid clumps
Use hot coffee instead of water for a deeper chocolate flavor
Store leftover cake covered in the fridge for up to 4 days
Freeze slices for up to 2 months—great for future treats
Let the cake cool fully before frosting to avoid melting