Usually, interpretation of redshift in static spacetimes (for example, near black holes) is opposed to that in cosmology. In this methodological note we show that both explanations are unified in a natural picture. This is achieved if considering the static spacetime one (i) makes a transition to a synchronous frame, (ii) returns to the original frame by means of local Lorentz boost. To reach our goal, we consider a rather general class of spherically symmetric spacetimes. In doing so, we construct frames that generalize the well-known Lemaitre and Painlev{e}--Gullstand ones and elucidate the relation between them. This helps to understanding in an unifying approach, how gravitation reveals itself in different branches of general relativity. This can be useful for general relativity university courses.