Answered by: Maulana Imran Mughal
Assalamu Alaikum Wa Rahmatullah
What should I do when I commit a mistake in saying Rabbana wa lakal hamd while praying alone in 1st rak’ah and realized it later in the second rak’ah?
بِسْمِ اللهِ الرَّحْمنِ الرَّحِيْم
The ruling for saying “Rabbana Wa Lakal Hamd” is sunnah, therefore if one does not do it, he is not obliged to repeat his salah or compensate in any way.
But if one were to purposefully leave out saying so believing that it is “just sunnah” then he will be sinful.
Only Allah Ta’ala knows best
Written by Maulana Imran Mughal
Checked and approved by Ustadha Sabrina
Darul Ifta Birmingham
 Imam Kasani, Bada’I as-Sana’I (Beirut: DKI, 2003), 2:55.
This answer was collected from DarulIftaBirmingham.co.uk, which is run under the supervision of Mufti Mohammed Tosir Miah from the United Kingdom.