Put it where the snake can touch it, and set the thermostat to what temperature you want that spot to be.
I usually put it touching the glass, but set it a bit higher than the temp readout there - the snake *usually* doesn't go under the bedding if there's a hide, and the substrate will not be as warm as the glass bottom of the tank would be.
Hope that helps!
-Jen