Reef fish sustain populations on isolated reefs and show genetic diversity between nearby reefs even though larvae of many species are swept away from the natal site during pelagic dispersal. Retention or recruitment to natal reefs requires orientation capabilities that enable larvae to find their way. Although olfactory and acoustically based orientation has been implicated in homing when larvae are in the reef’s vicinity, it is still unclear how they cope with greater distances. Here we show evidence for a sun compass mechanism that can bring the larvae to the vicinity of their natal reef. In a circular arena, pre-settlement larvae and early settlers (<24 hours) of the cardinal fish, Ostorhinchus doederleini, showed a strong SSE directional swimming response, which most likely has evolved to compensate for the locally prevailing large scale NNW current drift. When fish were clock-shifted 6 hours, they changed their orientation by ca. 180° as predicted by the tropical sun curve at One Tree Island, i.e. they used a time-compensated sun compass. Furthermore, the fish oriented most consistently at times of the day when the sun azimuth is easy to determine. Microsatellite markers showed that the larvae that had just arrived at One Tree Island genetically belonged to either the local reef population or to Fitzroy Reef located 12 kilometers to the SSE. The use of a sun compass adds a missing long-distance link to the hierarchy of other sensory abilities that can direct larvae to the region of origin, including their natal reef. Predominant local recruitment, in turn, can contribute to genetic isolation and potential speciation.