Hadith on Charity: Types of ongoing charity after death

Abu Huraira reported: The Messenger of Allah, peace and blessings be upon him, said, “Verily, among the good deeds that will join a believer after his death are these: knowledge which he taught and spread, a righteous child he leaves behind, a copy of the Quran he leaves for inheritance, a mosque he has built, a house he built for travelers, a well he has dug, and charity distributed from his wealth while he was alive and well. These deeds will join him after his death.”

Source: Sunan Ibn Mājah 242

Grade: Hasan (fair) according to Al-Albani

عَنْ أَبِي هُرَيْرَةَ قَالَ قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ إِنَّ مِمَّا يَلْحَقُ الْمُؤْمِنَ مِنْ عَمَلِهِ وَحَسَنَاتِهِ بَعْدَ مَوْتِهِ عِلْمًا عَلَّمَهُ وَنَشَرَهُ وَوَلَدًا صَالِحًا تَرَكَهُ وَمُصْحَفًا وَرَّثَهُ أَوْ مَسْجِدًا بَنَاهُ أَوْ بَيْتًا لِابْنِ السَّبِيلِ بَنَاهُ أَوْ نَهْرًا أَجْرَاهُ أَوْ صَدَقَةً أَخْرَجَهَا مِنْ مَالِهِ فِي صِحَّتِهِ وَحَيَاتِهِ يَلْحَقُهُ مِنْ بَعْدِ مَوْتِهِ

242 سنن ابن ماجه كتاب المقدمة باب ثواب معلم الناس الخير

200 المحدث الألباني خلاصة حكم المحدث حسن في صحيح ابن ماجه