Answered according to Hanafi Fiqh by
While praying salah behind imam, after ruku, imam says “SamiAllahu Liman Hamidah” and muqtadi says “Rabbana Lakal Hamd”. While praying salah alone, to say both (SamiAllah…. and Rabbana…….?). But it is to say so both while only in fardh salah or also while praying sunnah and nafl or to say only SamiAllah….. while sunnah and nafl salah? While praying salah alone, if forgot to say Rabbana…. after SamiAllah…. in 1 or in all rakahs, then will require to repeat salah or not? Please guide me.

بسم الله الرحمن الرحيم

(Fatwa: 953/622/L=1434)

(1) Yes, munfarid (the person offering salah alone) shall combine both of them.
(2) It is not specific with fardh salah only; it also includes sunnah and nafl salah.
(3) It is sunnah to say ربنا ولك الحمد after سمع الله لمن حمده. If someone forgets to say ربنا لك الحمد then there is no need to repeat the salah.

Allah knows Best!

Darul Ifta,
Darul Uloom Deoband