We use first-principles calculations and experimental data to demonstrate that impurity segregation at heterointerfaces is governed by several factors. In particular, Hf impurities avoid the Si-SiO 2 interface when present in the SiO 2 side, might segregate if present in the Si side, but do not cross into SiO 2 . Substitutional Hf impurities in SiO 2 , as revealed by a through-focal series of Z-contrast images, act as markers for Si sites, suggesting ordering in the first two Si planes of the amorphous SiO 2 . Finally, we show that dopants in Si segregate at the interface by adopting several distinct configurations and also do not cross into SiO 2 .