24 hours before cooking, salt the chicken with an even layer of salt (about 1-2 tsp), cover and refrigerate.
Preheat the oven to 425° F (220° C) and bring the chicken up to room temperature on the counter.
Place half of the onion, lemon, and thyme in the bottom of the pan. Place the other half of the onion, lemon, and thyme in the cavity of the chicken.
Set the chicken in the pan with the breasts up. Pour olive oil over the chicken and sprinkle pepper and a little more salt.
Cook undisturbed for 30 minutes. Then lower the heat to 400° F (200° C) and baste the chicken. Continue cooking for 30-40 more minutes or until the juices run clear.