Use jars specifically designed for canning, such as Mason jars. These are made to withstand the heat of canning and form a proper seal.