We present a method, based on positron annihilation spectroscopy, to obtain information on the defect depth profile of layers grown over high-quality substrates. We have applied the method to the case of ZnO layers grown on sapphire, but the method can be very easily generalized to other heterostructures ͑homostructures͒ where the positron mean diffusion length is small enough. Applying the method to the ratio of W and S parameters obtained from Doppler broadening measurements, W / S plots, it is possible to determine the thickness of the layer and the defect profile in the layer, when mainly one defect trapping positron is contributing to positron trapping at the measurement temperature. Indeed, the quality of such characterization is very important for potential technological applications of the layer.