Prepare the Cake Layers
Preheat oven to 350°F (175°C). Grease and flour three 8-inch round cake pans (or two 9-inch pans) and line the bottoms with parchment paper.
In a medium bowl, whisk together cake flour, baking powder, baking soda, and salt.
In a large mixing bowl, cream butter and sugar together with a hand mixer or stand mixer on medium speed until light and fluffy (about 3 minutes).
Beat in eggs one at a time, then add vanilla and coconut extract.
Reduce speed to low and alternately add the dry ingredients and the coconut milk/buttermilk mixture, starting and ending with the dry ingredients. Mix until just combined—do not overmix.
Bake the Cake
Divide the batter evenly among the prepared pans and smooth the tops.
Bake for 25–30 minutes or until a toothpick inserted in the center comes out clean.
Let cakes cool in pans for 10 minutes, then remove and cool completely on wire racks.
Make the Frosting
In a large mixing bowl, beat softened butter until creamy (about 1 minute).
Gradually add powdered sugar, 1 cup at a time, alternating with coconut milk, and beat until smooth and fluffy.
Add vanilla and coconut extract, mixing until well combined.
Assemble the Cake
Place one cake layer on a serving plate or cake stand. Spread a layer of frosting on top, then sprinkle with shredded coconut.
Repeat with the second layer, and top with the third.
Frost the top and sides of the cake, then gently press shredded coconut all over until completely coated.
Chill and Serve
For the best texture and flavor, chill the cake for at least 30 minutes before slicing.