MadSci Network: Astronomy |
Yes, but the effect is largely not significant. The doppler shifts of distant galaxies are measured by observing the spectra of the superimposed light of billions of stars. Almost all of these are main sequence and giant stars, for which the gravitational redshift is about 1 part in a million, or less. White dwarf stars produce light redshifted by about 1 part in 10000, and neutron stars by roughly 20%, but light from these stars does not contribute much at all to the overall visible light emitted by distant galaxies.
Try the links in the MadSci Library for more information on Astronomy.