Fireplaces emit a comforting glow during cold winter nights, but if they are poorly designed they may take more heat out of your house than they put into it. If the point where your chimney passes through your wall or roof is badly insulated, there is a lot of heat passing through that area and into the outdoors.
Expanding insulating foam is a product that can be sprayed into small cracks and crevasses which then expands and stops drafts and leaks. You can purchase expanding foam in a spray can with an attached nozzle for reaching into tight areas. This product is ideal for a poorly insulated chimney-to-wall connection where cold air is getting into the home. There is little risk of excess heat on the outside of a chimney, but if you want to be extra safe you can buy fireproof expanding foam that has fire retardant in it.
Some fireplaces have chimneys that pass through the interior of the house and exit through the roof, while other fireplaces protrude from the side of the house and connect to a chimney that runs up the outside of the wall. Whichever type of fireplace you have, you can be sure that either the fireplace or the chimney passes through the exterior skin of your house at some point. Locate this point and inspect it carefully for air and heat leakage. If you find cracks or openings where heat is being lost, stop them up using expanding foam on both the inside and outside surfaces of the house.
When used properly and maintained, fireplaces present little risk of damage or fire. However, if chimneys are allowed to fill with creosote or fires are allowed to get too hot, there can be a risk of a chimney fire. To keep a fireplace working properly, never use spray foam on the inside of the fireplace or the chimney, or on the damper. On the exterior surfaces of the fireplace and chimney, spray foam is fine because these surfaces won't get hot enough to melt it or to cause any damage. However, spray foam is not designed for direct contact with open flame.
Using spray foam in the appropriate places to stop up heat leaks around your fireplace is one of the best ways to make your home more efficient. Many people spend large amounts of money on complex heating systems without paying sufficient attention to the importance of good insulation. If your house can't retain the heat that is produced, it doesn't matter how good a heating system it has. For extra heat retention, go into your basement or crawl space underneath your fireplace and inspect the foundation of the fireplace for any signs of heat leakage.