Manner of offering condolences to a bereaved person

Q 6: How can we console someone who lost a dear person: Should we go to their house or workplace because people now live far away from each other, especially as people do not see their relatives or acquaintances except in special occasions, including the event of death? Is it permissible for someone who lost a dear person to them to stay in his house to receive the people who want to console them? How and where can we console them? (Part No. 7; Page No. 339

A 6: The Sunnah (action following the teachings of the Prophet) is to console the bereaved family whether in the Masjid (mosque), in their house, office, in the market or at the graveyard if possible. However, if someone could not perform the Funeral Prayer over the dead in the Masjid, they can console the bereaved family by the phone or via correspondence.