Heat the oven to 325°F (165°C). Line a baking sheet with parchment paper.
Beat the butter and sugar until smooth and creamy. Beat in the vanilla if using.
In a separate bowl, whisk together the flour, salt, cinnamon, nutmeg, cloves, and ginger. Add the dry ingredients to the butter mixture and mix just until a soft dough forms.
Roll the dough into 1-inch balls or roll and cut into shapes. Place on the baking sheet and chill 15 minutes. Bake 14 to 18 minutes, until set and lightly golden at the edges. Cool completely before serving.