A theoretical study, within the effective-mass approximation, of the effects of applied magnetic fields on excitons trapped in quantum dots/interface defects is presented. Actual traps are formed by fluctuations either in composition or structure size in narrow ${\mathrm{G}\mathrm{a}\mathrm{A}\mathrm{s}/\mathrm{G}\mathrm{a}}_{1\ensuremath{-}x}{\mathrm{Al}}_{x}\mathrm{As}$ quantum wells. Exciton trapping is taken into account through a model quantum dot formed by monolayer fluctuations in the $z$ direction, and lateral confinement, via a parabolic potential, in the exciton-in plane coordinate. Magnetic fields are applied in the growth direction of the semiconductor heterostructure, and the various magnetoexciton states are obtained in the effective-mass approximation by an expansion of the exciton-envelope wave functions in terms of products of hole and electron quantum-well states with appropriate Gaussian functions for the various excitonic states. Theoretical results are found in overall agreement with available experimental measurements.