We determine the structural relaxations around paramagnetic impurities (Ti, Cr, Fe) in corundum (alpha-Al2O3), by combining x-ray absorption near edge structure (XANES) experiments and ab initio calculations. The structural relaxations are found to be very local. We then show that XANES is sensitive to small variations in interatomic distances within the coordination shell of the absorbing atom. The experiments were carried out on single crystals of ruby and sapphires. Linear dichroic signals are essential to characterize the geometry of the impurity site. The calculations were performed within a self-consistent ``non muffin-tin framework, that uses pseudopotentials, plane-wave basis set, and the continued fraction for the absorption cross section.