Can I just make a flour cake gluten free by replacing the flour with almond or coconut flour?
Are you channeling your best self with this comment? (If you're not sure, check out our Code of Conduct.)
HalfPint is a trusted home cook.
Unfortunately, it is not as straightforward as that. Gluten provides structure and texture in baked goods. If you only used almond flour or coconut flour, you would get something that is very dense and crumbly. Often times, gluten-free flour substitutes are a mix of starches and non-gluten flours to get an approximation of the features of wheat flour. You are best using a cake recipe that was designed to use almond flour or coconut flour. You just can't do a 1:1 substitution and have the resulting cake be anything close to what it was meant to be.
I exactly agree with HalfPint. A good replacement GF flour mix is particularly essential for something like a cake where texture is super important. Unfortunately, there isn't a single flour that can replace wheat -- rather you need a mix. If you are going to dedicate yourself to GF baking (such as if someone has Celiac Disease in your family) then invest in some good cookbooks and internet research, as well as an assortment of non-gluten (e.g., wheat, rye or barley) based flours and binders (like guar gum or xanthan gum) and start experimenting. If this is a one-off event, I'd suggest either a premixed GF flour blend (cup-4-cup is good, but expensive and also contains dairy, so don't use it if there is also a dairy intolerance to cook around; King Arthur's and Pamela's aren't bad; some others use bean flours which can result in a bit of a "beany" flavor -- pretty undesirable in delicate baked goods like cake).