Preheat the oven to 425°F. Lightly grease the inside of a roasting pan that's large enough to hold your chicken, plus the cut up vegetables.
Pat the chicken dry with paper towels and place it in the roasting pan.
Use a microplane to zest one of the lemons into a small bowl. Hold the zest aside to use later for the sauce.
Cut the zested lemon into quarters; place them inside the cavity of the chicken. Tie the legs together with kitchen twine. Tuck the wings back behind the body.
Rub two tablespoons of the olive oil over the entire surface of the chicken, including the legs and wings.
Prepare the onions, potatoes, and lemons:
Remove the outer, papery peels of the yellow and red onions. Slice them into thick wedges, then place them around the chicken in the pan.
Cut the red potatoes into 1½-inch chunks and add them to the pan around the chicken. Cut two lemons into quarters and add them to the pan around the chicken.
Drizzle the remaining tablespoon of olive oil over the onions, potatoes, and lemons. Sprinkle the ½-teaspoon of salt and ¼-teaspoon of pepper over the chicken.
Begin roasting the chicken:
Slide the pan into the oven, and roast the chicken for 15 minutes per pound: for a 5-pound bird, that's 1¼ hours; for a 6-pound bird, plan on 1½ hours.
Make the chimichurri sauce:
While the chicken roasts, make the chimichurri sauce.
Add the onion, garlic, parsley, oregano, red pepper flakes, teaspoon of salt, and ¼ teaspoon of pepper into the bowl of a food processor. Process the ingredients until they're finely chopped and blended together. (Scrape the bowl of the food processor once or twice if necessary.)
Pour in the olive oil, lemon juice, and the reserved lemon zest. Run the processor again until you have a thick sauce—this is your chimichurri sauce! You'll have about 1¼ cups of chimichurri.
Baste and finish roasting the chicken:
Thirty minutes before the chicken is finished roasting, brush a ¼ cup of the chimichurri sauce over the entire surface of the chicken. Drape a piece of foil over the top of the bird (to prevent the herbs from browning too quickly.) Return the pan to the oven for the final 30 minutes.
The chicken is done when juices are clear when the meat is sliced between the thigh and leg. The internal temperature of the meat should be at least 165°F; the dark meat will have the best texture when cooked to around 185°F.
Remove the pan from the oven and allow the chicken to rest for 10 minutes. You can spread a little more chimichurri over the surface if you'd like.
Serve!
Carve the chicken and serve pieces with chimichurri sauce on the side for dipping and driizling. Don't forget to serve roasted potatoes, onions, and lemons with the chicken!
Notes
If you have a very large cast iron skillet or baking dish, these can be used instead of a roasting pan.