Close...
UTHs are not meant to heat the environment (i.e., raise the ambient temperature). For this reason, a thermostat can only control it properly if the probe is in very close proximity to the heat source itself. Because of the big drop in temperature the further away from a UTH you get, they don't work safely for our pets when used incorrectly. A UTH (and the floor it's in contact with) can easily be too hot for your snake even though just a couple inches away you're reading temperatures that are perfectly fine. If the thermostat probe gets moved, is buried, is dangling in the air, gets wet, etc, you might as well not even have a thermostat. This is why you always see the recommendation to place the thermostat probe, when using a UTH as your heat source, on the outside of the cage sandwiched between the heat source and the bottom of the enclosure. This keeps it away from as many external factors as possible that will cause it to not function safely.