Spaghetti al Pesto: How to Make It Right
| ~6 min read | Pasta Sauces
Sections
Yes — spaghetti al pesto is a real, classic Italian dish, and it is one of the simplest pasta preparations in the repertoire. Cook spaghetti to al dente, drain it while saving some of the starchy cooking water, then toss the hot pasta with basil pesto off the heat, loosening the sauce with a splash of that water until it coats every strand. The dish is traditionally associated with Genoa, where it is called pasta al pesto, and spaghetti is only one of several shapes used.
What Pesto Actually Is
Pesto alla genovese is an uncooked sauce made from fresh basil, pine nuts, garlic, salt, olive oil and a hard aged cheese — traditionally a mix of Parmigiano-Reggiano and Pecorino. The name comes from the Genoese word pestâ, meaning to pound or crush, because the sauce was originally made in a marble mortar with a wooden pestle rather than a blender. Crushing the leaves gently produces a brighter, less bitter sauce than a high-speed blade, which can bruise the basil and turn it dark.
The classic proportions are flexible but roughly: two packed cups of basil leaves, a quarter cup of pine nuts, one or two garlic cloves, half a cup of grated cheese, and about half a cup of olive oil, with salt to taste. Many cooks add a small amount of butter for roundness, though that is a variation rather than the standard.
Why Spaghetti Works — and What Else Does
Spaghetti is a fine vehicle for pesto because its long, smooth strands carry a thin sauce well, and the twisting motion of twirling picks up sauce evenly. That said, the classic Genoese pairing is trenette, a flat, narrow noodle, often served with green beans and diced potato cooked in the same pot. Other good choices include linguine, bucatini, fusilli and penne, where the ridges and hollows trap the sauce.
- Long, thin shapes (spaghetti, linguine, trenette): light coating, good for a simple pesto.
- Ridged or hollow shapes (fusilli, penne, trofie): hold more sauce per bite.
- Avoid very thick shapes like rigatoni with a thin pesto — the sauce slides off.
Cooking the Pasta and Getting the Sauce to Cling
The technique matters more than the ingredients once the pesto is made. Pesto is a raw sauce, so it should never be cooked; heat dulls the basil and can make the cheese stringy. The goal is to warm it through with the residual heat of the pasta.
- Bring a large pot of water to a rolling boil and salt it generously — roughly one to two tablespoons of salt per four quarts of water. Pesto contains cheese and salt, so do not overdo it.
- Add the spaghetti and cook to al dente, checking a strand a minute or two before the package time. For dried spaghetti, that is usually one to two minutes less than the stated time.
- Before draining, scoop out about a cup of the cloudy cooking water and set it aside.
- Drain the pasta, then return it to the warm pot off the heat. Add the pesto and toss, adding splashes of the reserved water until the sauce loosens and coats the strands.
- Serve immediately with a little extra grated cheese and, if you like, a few whole basil leaves.
The reserved water is not optional if you want a silky result. It contains starch that emulsifies with the oil in the pesto, turning a greasy, clumpy sauce into a smooth one. Add it a tablespoon at a time; too much and the sauce turns watery.
Common Problems and How to Fix Them
- Pesto turns brown or dark. Basil oxidizes when exposed to air and heat. Keep the sauce covered with a thin layer of olive oil, and add it to the pasta off the heat.
- Sauce is oily and separates. The oil has not emulsified. Toss harder with a little pasta water, or stir a spoonful of the water into the pesto before adding it.
- Pesto tastes bitter. Over-blending, old basil, or too much raw garlic. Use fresh leaves, pulse rather than purée, and start with one clove.
- Too salty. The cheese and added salt stack up. Salt the water modestly and taste the pesto before adding more salt.
Making Pesto at Home vs. Buying It
Jarred pesto is convenient but varies widely: many commercial versions use cheaper oils, add sugar or starch, and contain far less basil than the label suggests. Read the ingredient list — basil should be near the top, and the oil should be olive oil. Fresh refrigerated pesto is usually closer to the homemade article. If you make your own, it keeps about a week in the fridge in a sealed jar topped with oil, and freezes well in small portions for several months.
If you are using a blender or food processor, pulse the basil, nuts and garlic first, then drizzle in the oil with the machine running, and stir the cheese in by hand at the end. Adding cheese during blending can make the sauce gummy.
Variations Worth Knowing
Pesto is a template as much as a recipe. Swapping pine nuts for walnuts, almonds or pistachios is common and cheaper. Replacing some basil with parsley or arugula changes the flavor. Pesto rosso uses sun-dried tomatoes, and pesto alla trapanese from Sicily uses almonds and tomatoes raw. None of these are the Genoese original, but they are all legitimate sauces in the same family.
Storage and Reheating Leftovers
Pesto pasta is best eaten fresh, but leftovers keep in a sealed container in the refrigerator for three to four days. Refrigerate within two hours of cooking (one hour if the room is above 90°F/32°C). Reheat gently in a covered pan or microwave with a splash of water to loosen the sauce; reheated pasta should reach 165°F (74°C). Do not leave pesto pasta sitting out at room temperature for long, and do not freeze dressed pasta — the texture suffers. Freeze extra pesto sauce itself, not the finished dish.
One safety note: homemade pesto is a raw sauce, and it contains no egg, so it is generally low-risk, but it does contain raw garlic and cheese. Anyone with a compromised immune system should use pasteurized cheese or a briefly warmed sauce. Never taste raw dough or raw flour mixtures when making fresh pasta to serve with pesto — cook fresh egg pasta to an internal temperature of 160°F (71°C) if you are checking, and always cook it through.
Frequently Asked Questions
Should you cook pesto?
No. Pesto is a raw sauce and should be tossed with hot pasta off the heat. Cooking it dulls the basil and can make the cheese stringy.
Can you use spaghetti with pesto, or is another shape better?
Spaghetti works well, but trenette, linguine, fusilli and trofie hold the sauce better. Use whatever you have; the technique matters more than the shape.
Why does my pesto pasta taste dry?
You likely skipped the pasta water. The starchy water emulsifies with the oil and helps the sauce coat the strands. Add it a tablespoon at a time while tossing.
How long does pesto pasta last in the fridge?
Three to four days in a sealed container at 40°F (4°C) or below. Reheat to 165°F (74°C).
Can I make pesto without pine nuts?
Yes. Walnuts, almonds and pistachios are common substitutes. Pine nuts are traditional but not essential.
Is pesto pasta served hot or cold?
Traditionally hot, tossed with freshly cooked pasta. It can be eaten at room temperature as a pasta salad, but refrigerate it promptly if you are not serving it right away.