Prepare the oven: Preheat oven to 350°F (180°C). Lightly grease a 12-inch (30 cm) round baking dish or a 9×13-inch (23×33 cm) baking dish.
Cook the pasta: Bring a large pot of salted water to a boil. Cook the macaroni until just al dente, about 1–2 minutes less than the package instructions. Drain and set aside.
Prepare the cheese: Grate and combine the cheddar, Gruyère, and mozzarella in a bowl. Set aside about ¼ of the mixture for topping.
Make the sauce: Melt the butter in a large saucepan over medium-low heat. Add the flour and whisk continuously for about 2 minutes to form a pale roux. Do not let it brown. Add the harissa and cook, whisking constantly, for 30–60 seconds. Gradually pour in the milk, whisking constantly until smooth.
Add the seasonings: Whisk in paprika, garlic powder, onion powder, salt, and black pepper. Cook for about 1 minute. Taste and add more harissa if desired.
Add the cheese: Reduce the heat to low. Gradually add the reserved ¾ of the cheese mixture, one handful at a time, stirring until melted and smooth. Do not let the sauce boil once the cheese has been added. Taste and adjust the seasoning if needed.
Combine: Add the drained pasta to the cheese sauce and stir until completely coated.
Bake: Transfer to the prepared baking dish and sprinkle the remaining cheese over the top. Bake for 20–25 minutes, until bubbling around the edges and lightly golden on top. For a more browned top, broil for 1–2 minutes at the end, watching carefully.
Serve: Let rest for about 5 minutes before serving.
Video
Notes
Harissa paste: Harissa varies significantly between brands and homemade versions. Some are mild and aromatic, while others are very spicy and concentrated. I recommend starting with ½ cup (120 g), tasting the sauce, and adding more if needed. Choose a harissa with a spice level you enjoy. For the best flavor, I recommend making your own using my easy homemade harissa recipe.
Don't use preshredded cheese: For the smoothest sauce, grate the cheese yourself rather than using pre-shredded cheese. Pre-shredded cheeses often contain anti-caking agents that can make the sauce less smooth.
Cheese options: Cheddar, Gruyère, and mozzarella give you a nice balance of sharp flavor, nuttiness, creaminess, and stretch. You can substitute them with other good melting cheeses such as Gouda, Monterey Jack, fontina, Emmental, or provolone. Keep in mind that the cheese you choose will affect both the flavor and texture. Stronger aged cheeses will give you a sharper, more intense mac and cheese, while milder cheeses will let the harissa stand out more.
Don't overcook the pasta: Cook the macaroni 1–2 minutes less than the package directions. It will continue cooking in the oven, and this helps prevent soft or mushy mac and cheese.
For a crunchy topping: For extra texture, mix ¾ cup (45 g) panko breadcrumbs with 2 tablespoons (30 g) melted butter. Sprinkle evenly over the mac and cheese before baking. You can also mix in 2–3 tablespoons of finely grated Parmesan for extra flavor.
Prefer a stovetop version? Skip the baking step and follow the method from my stovetop mac and cheese recipe, adding the harissa to the thickened sauce before adding the cheese.
Don't worry if the sauce looks thin: The sauce may look quite loose at first. This is normal. It thickens as it cooks, and the pasta will absorb more moisture as the mac and cheese bakes and rests.
Add the milk slowly: Pour the milk in gradually while whisking constantly. Adding it too quickly can create lumps and prevent the sauce from thickening properly.
Don’t brown the roux: When cooking the butter and flour, keep the heat medium-low and whisk continuously. If the roux browns, it develops a nutty flavor and loses some of its thickening power. For mac and cheese, you want a pale roux so the sauce stays smooth, creamy, and mild.