The site preference of transition metal impurities in Ni3Al was studied using electronic total energy calculations based on the local density approximation. By comparing the total energies of judiciously selected supercells both for spin-polarized and non-spin-polarized cases, it was found that magnetism strongly affects the computed site substitution behavior of Fe in Ni3Al. When magnetic effects are ignored, Fe is computed to have a preference for the Ni sublattice, a result that is contradicted by experimental determinations. When magnetic effects are accounted for it is found that Fe has no significant site preference. Magnetism also affects the site preference of Mn and Co, but it has no effect on the site preference of early transition metals. Previous theoretical approaches have predicted incorrectly that Fe and Mn have Ni sublattice site preferences. The current findings improve the agreement between theoretical calculations and experimental observations.