Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
ahmad:12291Hāshim b. al-Qāsim > Ziyād b. ʿAbdullāh b. ʿUlāthah > Salamah b. And Rdān al-Madanī > Anas b. Mālik

"A man come to the Prophet (saas) and said: 'O Messenger of Allah, what supplication is best?' He said: 'Ask your Lord for forgiveness and to be kept safe and sound in this world and in the Hereafter.' Then (the man) came the next day and said: 'O Messenger of Allah, what supplication is best?' He said: 'Ask your Lord for forgiveness and to be kept safe and sound in this world and in the Hereafter.' Then (the man) came the third day and said: 'O Prophet of Allah, what supplication is best?' He said: 'Ask your Lord for forgiveness and to be kept safe and sound in this world and in the Hereafter, for if you are forgiven and kept safe and sound in this world and the Hereafter, you will have succeeded.'" (Using translation from Ibn Mājah 3848)   

أحمد:١٢٢٩١حَدَّثَنَا هَاشِمُ بْنُ الْقَاسِمِ حَدَّثَنَا زِيَادُ بْنُ عَبْدِ اللهِ بْنِ عُلَاثَةَ حَدَّثَنَا سَلَمَةُ بْنُ وَرْدَانَ الْمَدَنِيُّ قَالَ سَمِعْتُ أَنَسَ بْنَ مَالِكٍ قَالَ

جَاءَ رَجُلٌ إِلَى رَسُولِ اللهِ ﷺ فَقَالَ يَا رَسُولَ اللهِ أَيُّ الدُّعَاءِ أَفْضَلُ؟ قَالَ تَسْأَلُ رَبَّكَ الْعَفْوَ وَالْعَافِيَةَ فِي الدُّنْيَا وَالْآخِرَةِ ثُمَّ أَتَاهُ مِنَ الْغَدِ فَقَالَ يَا رَسُولَ اللهِ أَيُّ الدُّعَاءِ أَفْضَلُ؟ قَالَ تَسْأَلُ رَبَّكَ الْعَفْوَ وَالْعَافِيَةَ فِي الدُّنْيَا وَالْآخِرَةِ ثُمَّ أَتَاهُ الْيَوْمَ الثَّالِثَ فَقَالَ يَا رَسُولَ اللهِ أَيُّ الدُّعَاءِ أَفْضَلُ؟ قَالَ تَسْأَلُ رَبَّكَ الْعَفْوَ وَالْعَافِيَةَ فِي الدُّنْيَا وَالْآخِرَةِ فَإِنَّكَ إِذَا أُعْطِيتَهُمَا فِي الدُّنْيَا ثُمَّ أُعْطِيتَهُمَا فِي الْآخِرَةِ فَقَدْ أَفْلَحْتَ  


See similar narrations below:

Collected by Ibn Mājah
ibnmajah:3848ʿAbd al-Raḥman b. Ibrāhīm al-Dimashqī > Ibn Abū Fudayk > Salamah b. And Rdān > Anas b. Mālik

"A man come to the Prophet (saas) and said: 'O Messenger of Allah, what supplication is best?' He said: 'Ask your Lord for forgiveness and to be kept safe and sound in this world and in the Hereafter.' Then (the man) came the next day and said: 'O Messenger of Allah, what supplication is best?' He said: 'Ask your Lord for forgiveness and to be kept safe and sound in this world and in the Hereafter.' Then (the man) came the third day and said: 'O Prophet of Allah, what supplication is best?' He said: 'Ask your Lord for forgiveness and to be kept safe and sound in this world and in the Hereafter, for if you are forgiven and kept safe and sound in this world and the Hereafter, you will have succeeded.'"  

ابن ماجة:٣٨٤٨حَدَّثَنَا عَبْدُ الرَّحْمَنِ بْنُ إِبْرَاهِيمَ الدِّمَشْقِيُّ حَدَّثَنَا ابْنُ أَبِي فُدَيْكٍ أَخْبَرَنِي سَلَمَةُ بْنُ وَرْدَانَ عَنْ أَنَسِ بْنِ مَالِكٍ قَالَ

أَتَى النَّبِيَّ ﷺ رَجُلٌ فَقَالَ يَا رَسُولَ اللَّهِ أَىُّ الدُّعَاءِ أَفْضَلُ قَالَ سَلْ رَبَّكَ الْعَفْوَ وَالْعَافِيَةَ فِي الدُّنْيَا وَالآخِرَةِ ثُمَّ أَتَاهُ فِي الْيَوْمِ الثَّانِي فَقَالَ يَا رَسُولَ اللَّهِ أَىُّ الدُّعَاءِ أَفْضَلُ قَالَ سَلْ رَبَّكَ الْعَفْوَ وَالْعَافِيَةَ فِي الدُّنْيَا وَالآخِرَةِ ثُمَّ أَتَاهُ فِي الْيَوْمِ الثَّالِثِ فَقَالَ يَا نَبِيَّ اللَّهِ أَىُّ الدُّعَاءِ أَفْضَلُ قَالَ سَلْ رَبَّكَ الْعَفْوَ وَالَعَافِيَةَ فِي الدُّنْيَا وَالآخِرَةِ فَإِذَا أُعْطِيتَ الْعَفْوَ وَالْعَافِيَةَ فِي الدُّنْيَا وَالآخِرَةِ فَقَدْ أَفْلَحْتَ