Preheat oven to 450°F. Set a wire rack inside a rimmed sheet pan.
Spatchcock the chicken if needed: cut out the backbone, flip, and press the breastbone to flatten. Pat very dry.
Stir together salt and baking powder. Sprinkle evenly over the chicken skin and rub to coat.
In a bowl, mix olive oil, garlic, lemon zest, lemon juice, smoked paprika, onion powder, pepper, thyme, rosemary, and red pepper flakes to form a paste.
Loosen skin over breasts and thighs. Rub some paste under the skin, then smear the rest all over the chicken.
Place chicken skin side up on the rack. Tuck wing tips underneath.
Roast 25 minutes. Baste with softened butter and pan juices, then roast 15–20 minutes more until 160–165°F in the thickest thigh.
Rest 10 minutes on the pan. Carve and spoon over any pan juices to serve.