Domestication can be described as the adaptation to living in close proximity to humans, and therefore domesticated species may be expected to thrive in human-modified landscapes. Indeed, the domestic dog is the most widespread and numerous canid, with the global population estimated at 1 billion individuals, 75% of which are free-ranging. We analysed genome-wide variability of free-ranging dogs across Eurasia, and found isolation-by-distance pattern, but no genetic structure. This is in contrast with grey wolves, showing strong genetic differentiation driven by habitat and prey differentiation. Domestication process has strongly modified the dietary niche of the dog as compared with their wild ancestors, and most free-ranging dogs at least partially rely on human-derived food sources, and occupy habitats were such food is available. Therefore, habitats and diet of free-ranging dogs are less differentiated across large geographic scales as compared with those of grey wolves, which in combination with continuity of human-modified habitats across Eurasia results in lack of genetic structure. Our analysis also showed that modern dogs have East Asian origin, and have spread across Eurasia during the Neolithic human migrations. Therefore, in Eurasia the dog has been an integral part of an agricultural landscape. The spread of agriculture led to a secondary contact between dogs and grey wolves, sometimes resulting in hybridisation, as suggested by genome-wide patterns of haplotype sharing. While such admixture is typically perceived as a conservation concern, in some cases dog-derived gene variants could have facilitated adaptation of their wild owners to living in human-modified landscapes.