Add the flour, baking soda, baking powder, and spices to a large bowl. Whisk to combine.
3 ¼ cups gluten-free flour blend, ½ teaspoon baking soda, ¼ teaspoon baking powder, 1 tablespoon ground ginger, 2 teaspoons ground cinnamon, ¼ teaspoons ground cloves, ½ teaspoon nutmeg, ½ teaspoon allspice, ¼ teaspoon finely ground pepper, ½ teaspoon salt
In a large mixing bowl, beat the butter for about a minute, until fluffy. Add the brown sugar and molasses and beat again to cream, 2-3 minutes, until lighter in colour and fluffy.
⅔ cup salted butter, ½ cup packed light brown sugar, ½ cup fancy molasses
Add the egg and vanilla and beat for another 2 minutes, scraping down the sides of the bowl as needed.
1 large egg, 1 teaspoon vanilla extract
Add the flour mixture to the butter mixture and mix on low speed until combined. The dough will be sticky. Divide into 2 pieces and wrap well, then chill overnight or for at least 4 hours.
Generously flour a piece of parchment paper on a work surface (this makes it easier to lift the cookies without tearing). Roll one piece of the dough out into a disc about ¼ inch (6 mm) thick. Line a baking sheet with parchment paper.
Cut out shapes with your cookie cutters. If the dough is tearing when lifted, transfer it to the fridge or freezer for 15-30 minutes to harden enough to lift without breaking. Transfer the shapes to the prepared baking sheet.
Re-roll the dough scraps and cut out more shapes, using as much of the dough as possible. Chill the cookies on the baking sheet for 20 minutes.
Preheat the oven to 350°F (180°C). Bake the chilled cookies for 8-13 minutes, depending on the size. The cookies will be lightly golden and just firm to the touch around the edges when they're ready. Repeat for the remaining dough.
Let the cookies cool on the baking sheet for 5-10 minutes before transferring to a wire rack to cool fully. Ice with royal icing and decorated as you'd like before serving. Gingerbread cookies can be stored in a sealed container at room temperature for up to a week.
Notes
Not all gluten-free flour blends are equal. We like Cup4Cup and Bob's Red Mill. Some brands, like Anita's might bread a little more than a traditional gingerbread cookie, so it's best to use simple shapes.