Basement or crawl space rim joists are a major source of energy loss in a house, so it's well worth the effort to add insulation and seal any cracks and gaps. A good DIY approach is to cut rigid foam insulation to fit between the joists. Cut it about 1/2 in. undersized so it's easy to fit in. Shim the rigid foam in place with little chunks of foam. Then fill the space around it with expanding foam. Don't forget to caulk or foam the joint between the sill plate and the foundation too
17 Ways to Master Expanding Foam Insulation - Now’s the time to work on insulating your home before the temperatures dip down too low. Insulating gaps now is one of the best ways to ensure you’re not letting heat out or cold air in this winter. Your furnace will thank you and so will your wallet when the heating bill comes!
Cut Cured Foam With a Bread Knife - A serrated knife with a flexible blade is perfect for cutting off excess foam. Just make sure the foam is completely cured and firm all the way through or it'll stick to the blade.
Add an Extension Tube - The short, stiff straw on cans of expanding foam makes it difficult to reach some areas. The solution is to buy a length of 1/4-in. tubing at the home center and use it to extend the straw. With this setup, you can reach almost anywhere.