The incorporation site of Er dopants inserted at high and low concentration (respectively 5 and 0.5 mol %) in nanoparticles of CaF 2 is studied by X-ray Absorption Spectroscopy (XAS) at the Er L III edge. The experimental data are compared with the results of structural modeling based on Density Functional Theory (DFT). DFT-based molecular dynamics is also used to simulate complete theoretical EXAFS spectra of the model structures. The results is that Er substitutes for Ca in the structure and in the low concentration case the dopant ions are isolated. At high concentration the rare earth ions cluster together binding Ca vacancies.