The offshoring of production by firms has expanded dramatically in recent decades, increasing their potential for economic growth. What determines the location of offshore production? How do countries’ policies and characteristics affect a firm's decision about where to offshore? Do firms choose specific countries because of the countries’ policies or because they know them better? In this paper, we use a rich dataset on Danish firms to analyze how decisions to offshore production depend on the institutional characteristics of the country and firm‐specific bilateral networks. We find that institutions that reduce credit risk and corruption increase the probability that firms will offshore there, while those that increase regulation in the labour market decrease this probability. We also show that a firm's probability of offshoring increases with the share of its employees who are immigrants from that country of origin. Finally, our analysis reveals that the negative impact of institutions that hinder offshoring is attenuated by a strong bilateral network of foreign workers.