Distance between earth and a galaxy
How is the distance between Earth/Milky Way and another galaxy measured? This came up reading an article about identifing galaxies that are very far from Earth. I understand that the Doppler effect can be used to measure the speed a galaxy/star is moving in relation to Earth by calculations of the red shift of a stars spectrum. This got to question of how is it known that the distance star is the one moving vs is it the Earth that is moving. Then the question of how distance is actually measured.