Closed-cell spray foam insulation is a popular choice for rim joists, as it provides an effective air barrier and insulation in one.