Behavioural responses to temperature are critical for survival, and animals from insects to humans show strong preferences for specific temperatures. Preferred temperature selection promotes avoidance of adverse thermal environments in the short term and maintenance of optimal body temperatures over the long term, but its molecular and cellular basis is largely unknown. Recent studies have generated conflicting views of thermal preference in Drosophila, attributing importance to either internal or peripheral warmth sensors. Here we reconcile these views by showing that thermal preference is not a singular response, but involves multiple systems relevant in different contexts. We found previously that the transient receptor potential channel TRPA1 acts internally to control the slowly developing preference response of flies exposed to a shallow thermal gradient. We now find that the rapid response of flies exposed to a steep warmth gradient does not require TRPA1; rather, the gustatory receptor GR28B(D) drives this behaviour through peripheral thermosensors. Gustatory receptors are a large gene family, widely studied in insect gustation and olfaction, and are implicated in host-seeking by insect disease vectors, but have not previously been implicated in thermosensation. At the molecular level, GR28B(D) misexpression confers thermosensitivity upon diverse cell types, suggesting that it is a warmth sensor. These data reveal a new type of thermosensory molecule and uncover a functional distinction between peripheral and internal warmth sensors in this tiny ectotherm reminiscent of thermoregulatory systems in larger, endothermic animals. The use of multiple, distinct molecules to respond to a given temperature, as observed here, may facilitate independent tuning of an animal's distinct thermosensory responses.