Praise be to Allah.
Death announcements are of three types: those that are forbidden, those that are disliked [makrooh], and those that are permissible.
The kind of death announcements that is forbidden is that which is like the death announcements of the people of the Jaahiliyyah, which were based on shouting out that news in public places and mentioning the status of the deceased and eulogizing him, or were accompanied by lamentation, wailing and distress.
Eulogising means mentioning the attributes of the deceased himself; status means mentioning his lineage.
Hashiyat al-Jamal ‘ala al-Manhaj, by Zakariyya al-Ansaari (3/687).
The kind of death announcement that is disliked [makrooh] is announcing the death by calling out and raising the voice, without mentioning his status and eulogizing him.
As for the kind of death announcement that is permissible, it is simply announcing the death of the deceased, without calling out.
Evidence from the Sunnah indicates that the last type of death announcements is permissible, as when the Prophet (blessings and peace of Allah be upon him) announced the death of the Negus, and of the martyrs of Mu’tah, and so on.
We have previously quoted the words of the scholars about that, in the answer to question no. 60008.
Al-Kaasaani said: There is nothing wrong with a person informing people such as his relatives, friends and neighbours of the death so that they may fulfil his rights such as offering the funeral prayer, offering supplication (du‘aa’) for him and accompanying the bier to the graveyard… Moreover, announcing it will encourage people to do an act of worship, and urge them to prepare for death, so it comes under the heading of helping one another in righteousness and piety, being a means of bringing about good, and telling others of a good deed.
End quote from Badaa’i‘ as-Sanaa’i‘ (3/207).
In Fataawa al-Lajnah ad-Daa’imah (8/402) it says: It is permissible to call the relatives, friends and neighbours of the deceased when he dies, so that they may offer the funeral prayer for him, offer supplication for him, accompany his bier and assist with his burial, because the Prophet (blessings and peace of Allah be upon him) informed his companions when the Negus (may Allah have mercy on him) died, so that they could pray for him. End quote.
There is nothing wrong with announcing and informing people of a death via social media such as Facebook, Twitter, WhatsApp and so on, or through email and text messages, if the purpose behind that is to inform people so that they may attend the funeral prayer, or offer supplication for the deceased and pray for forgiveness for him, or offer condolences to his family, because that is a means of bringing about these righteous deeds.
Shaykh ‘Abd al-‘Azeez ibn Baaz (may Allah have mercy on him) was asked about death announcements in newspapers, and he said: We do not see anything wrong with that, if it is simply for the purpose of informing people.
End quote from Masaa’il al-Imam Ibn Baaz by Ibn Maani‘ (p. 108).
Shaykh Ibn ‘Uthaymeen said: With regard to announcing the death of the deceased, if it is for a good reason, such as if the deceased interacted widely with people in business, and his death is announced so if anyone is owed anything by him, it can be paid to him (from his estate) and so on, there is nothing wrong with that.
End quote from Majmoo‘ Fataawa wa Rasaa’il al-‘Uthaymeen (17/461).
Shaykh Ibn Jibreen said: There is nothing wrong with spreading the news of the death of people who were well known for goodness and righteousness, so that the Muslims may pray for mercy for them and offer supplication for them, but it is not permissible to praise them for things that they did not do or traits that they did not possess, because that is clearly lying.
End quote from Fataawa Islamiyyah (2/106).
And Allah knows best.