From Sheremetyevo Airport’s website:
Foreign citizens waiting for their connecting flight are allowed to stay at Sheremetyevo Airport up to 24 hours without a valid Russian visa. The passenger should have a ticket of the relevant airline with confirmed seating for the relevant connecting flights.
International transit passengers whose transfer requires their stay at Sheremetyevo Airport in excess of 24 hours, may obtain a Russian transit visa at the airport (upon presentation of their connecting flight tickets and valid IDs).
Unless you’re flying from or to Belarus
Passengers from/to Belarus should be aware of the need to have a Russian transit visa regardless of the duration of their stay at the airport.
Credit:stackoverflow.com‘