What's the best way to secure the thermostat probe on the heat source? In terms of placement/location/material etc?

I think I did it sort of incorrectly in the past - I taped the end of the probe on top of the UTH with aluminum foil tape, but now I've heard that taping the actual like sensor part isn't good because heat can get trapped in there causing it to get incorrect readings or something of that nature.