Preheat oven to 350 degrees. Place rack in the center of the oven. Grease a 9 x 13-inch pan or casserole dish.
Cook macaroni in boiling water according to package directions. Drain well.
In a saucepan, cook onion in butter until soft. Add flour and seasonings.
Add milk all at once. Whisk until smooth.
Cook on medium heat until thickened and bubbly. Add cheeses, stir until melted.
Add the macaroni to cheese sauce and pour into casserole dish or pan. Top with about 3/4 cup grated cheese.
Bake for 30 minutes.
Notes
Make ahead instructions: Follow the directions as listed, adding 3 cups milk rather than 2 ½ cups. Cover dish with plastic wrap and refrigerate until ready to bake. The additional ½ cup milk will absorb into the pasta and keep the mac and cheese from becoming too dry.