Despite anecdotal reports of the astonishing homing abilities in dogs, their homing strategies are not fully understood. We equipped 27 hunting dogs with GPS collars and action cams, let them freely roam in forested areas, and analyzed components of homing in over 600 trials. When returning to the owner (homewards), dogs either followed their outbound track ('tracking') or used a novel route ('scouting'). The inbound track during scouting started mostly with a short (about 20 m) run along the north-south geomagnetic axis, irrespective of the actual direction homewards. Performing such a 'compass run' significantly increased homing efficiency. We propose that this run is instrumental for bringing the mental map into register with the magnetic compass and to establish the heading of the animal.