Basil can be frozen whole leaf, chopped/sliced or pureed. I pureed mine this year because it takes up much less room in the freezer. I had a gallon of leaf, pureed it was 1 cup, I froze it in an ice cube tray. You can freeze it whole leaf but keep in mind that when you defrost it it will be limp and wilted, so plan for that. It is not suitable for fresh applications once frozen.
Dill I've never successfully frozen, hopefully someone else has a recommendation. I usually dry mine instead. It's nowhere near as good as fresh, but much better than store-bought. I remove the fronds from the thick stems, lay the fronds on a paper towel in a thin layer, cover with another towel and let them air dry, turning them every few days. Drying them slowly helps keep more flavor in them (IMO).