To make these cupcakes gluten-free, substitute the all-purpose flour with a high-quality 1:1 gluten-free baking flour blend that includes xanthan gum. Be sure to check that all other ingredients, including the cocoa powder and shredded coconut, are certified gluten-free. The texture may be slightly more delicate, but the flavor remains just as rich and satisfying.