Multinational production (MP) can lead to large gains through international technology sharing. However, empirical evidence suggests that geography matters for MP: Affiliate sales fall in distance from the headquarters. We introduce intrafirm trade into a standard model of exports and MP, and show that the model is consistent with firm-level and aggregate evidence. Using a maximum likelihood estimator, we find that intrafirm trade plays a crucial role in shaping the geography of MP. An implication of our work is that MP and exports are very similar activities. Consequently, shutting down MP leads to relatively small welfare losses.