During the last few decades two important intellectual contributions have reshaped our understanding of international trade. On the one hand, work emphasizing trade frictions and extended gravity models has shown that countries trade more with those with whom they share a language, colonial past, or ethnic social relationships. This is interpreted as evidence of trade not being only about differences in factor endowments and transportation costs, but the result of complex social processes where information frictions and social networks play a key role. On the other hand, work emphasizing knowledge diffusion has shown that the probability that a country starts exporting a product increases with the number of related products it already exports. Yet, despite the importance of these two recent findings, little is known about their intersection: does knowledge on how to export to a destination also diffuses among related products? Here, we use bilateral trade data from 2000 to 2015, disaggregated into 1,242 product categories, to create an extended gravity model of bilateral trade that reproduces previous findings (effects of language, distance, colonial past, etc.) and shows that, in addition to these, countries are more likely to increase their exports of a product to a destination when: (i) they export related products to it, (ii) already export that product to some of its neighbors, and (iii) have neighbors who also export the same product to that destination. We interpret these findings as evidence of knowledge diffusion among related products and among geographic neighbors, both in the context of exporters and importers. Then, we explore the magnitude of these effects for new, nascent, and experienced exporters, and also, for groups of products classified according to Lall's technological classification of exports. We find that the effects of product and geographic relatedness are stronger for new exporters, and also, that the effect of product relatedness increases with the technological sophistication of products. These findings support the idea that international trade is shaped by knowledge and information frictions that are partially reduced in the presence of product relatedness.