Preheat oven to 350 F. Grease the bottom and sides of an 8-x-8 glass baking dish with butter or shortening. Set aside.
In a large bowl, whisk or sift flour, 1 cup granulated sugar, and 3 tablespoons cocoa powder.
Stir in milk, melted butter, and vanilla extract, if using.
Pour batter into prepared pan and spread to an even layer.
In a medium bowl, whisk together remaining granulated sugar (1/2 cup), brown sugar, and remaining cocoa powder (4 tablespoons)
Sprinkle this mixture evenly over the batter into an even layer, being careful NOT to disturb the batter layer.
Next, carefully pour the hot water evenly over the sugar mixture, do not stir.
Carefully place the pan on a cookie sheet (just in case the chocolate syrup bubbles over a little.) and then place it into the oven.
Bake for 40-45 minutes.
Remove from oven (center will be a bit jiggly) and let it sit for 15-20 minutes. (This will allow the sauce on the bottom to cool and thicken)
Spoon into bowls and spoon on the chocolate sauce from the pan. Top with vanilla ice cream if using.