This paper presents a thorough experimental investigation of erbium-doped aluminium nitride thin films prepared by R.F. magnetron sputtering, coupling Scanning Transmission Electron Microscopy X-ray-mapping imagery, conventional Transmission Electron Microscopy and X-ray diffraction. The study is an attempt of precise localisation of the rare earth atoms inside the films and in the hexagonal wü rtzite unit cell. The study shows that AlN:Er x is a solid solution even when x reaches 6 at.%, and does not lead to the precipitation of erbium rich phases. The X-ray diffraction measurements completed by simulation show that the main location of erbium in the AlN wü rtzite is the metal substitution site on the whole range. They also show that octahedral and tetrahedral sites of the wü rtzite do welcome Er ions over the [1.6-6%] range. The XRD deductions allow some interpretations on the theoretical mechanisms of the photoluminescence mechanisms and more specifically on their concentration quenching.