Every prayer starts with a Takbiratul-Ihram, after which we leave all of our worldly matters and give our undivided attention to the prayer.
Upon giving the Takbir, there is a supplication which we make before reciting the obligatory Surah Al-Fatihah. This prayer is referred to as Dua Iftitah (the opening supplication).
Dua Iftitah is a blessed Sunnah (encouraged) that is encouraged to be recited during a prayer. As per the rulings in Mazhab As-Syafee, the acts of Sunnah during the prayers itself can be categorised into two:
Dua Iftitah is an encouraged act that falls under the category of Sunnah Hay’ah. Which means that if a person were to miss this supplication, it does not nullify the prayer nor does he/she need to compensate it by performing the Sujud sahwi before ending the prayer.
Dua Iftitah can be recited in any prayers, obligatory (fardhu) or non-obligatory (sunnah), and whether we are praying individually or in congregation. The only exception is in the Jenazah prayer, where the Dua Iftitah is not sought to be read.
Dua Iftitiah is recited after the Takbiratul-Ihram during the first rakaat.
However, if a person (ma’mum) enters a congregational prayer after the Imam has already proceeded to the Ruku’ position or beyond, the Dua Iftitah is no longer sought to be recited.
Similarly, if a person enters the congregational prayer while the Imam is still standing, but fears leaving the recitation of Surah Al-Fatihah before the Imam proceeds to the Ruku’ position, then the person should instead focus on reciting Surah Al-Fatihah. Therefore, the Dua Iftitah in this case is no longer an encouraged act of worship.
The other case would be if a person starts the prayer and immediately recites the Ta’awwuz (seeking refuge in Allah s.w.t) ;
أَعُوذُ بِاللَّهِ مِنْ الشَّيْطَانِ الرَّجِيمِ
I seek refuge with Allah from the accursed Shaytan
In this scenario, the person does not recite the Dua Iftitah after the Takbir, instead, he/she proceeds to recite the Ta’awwuz or Surah Al-Fatihah immediately. According to the popular view in Mazhab As-Syafiee, the person does not need to retract and recite the missed Dua Iftitah but it suffices for him/her to continue with the prayer.
اللهُ اَكْبَرُ كَبِيْرًا
Allaahu Akbar Kabiraa
وَالْحَمْدُ لِلهِ كَثِيْرًا
وَسُبْحَانَ اللهِ بُكْرَةً وَاَصِيْلًا
Wa Subhānallāhi Bukratan Wa aṣīlā
وَجَّهْتُ وَجْهِيَ لِلَّذِيْ فَطَرَالسَّمَاوَاتِ وَالْأَرْضَ
Wajjahtu Wajhi lil-lazi Fataras-Samawāti wal-Ardh
حَنِيْفًا مُسْلِمًا وَمَا أَنَا مِنَ الْمُشْرِكِيْنَ
Hanīfan-Musliman Wamā ana minal-musyrikīn
إِنَّ صَلَاتِيْ وَنُسُكِيْ وَمَحْيَايَ وَمَمَاتِيْ لِلَّهِ رَبِّ الْعَالَمِيْنَ
Inna ṣalātī, wanusukī wamahyayā, wamamātī Lillāhi rabbil-'ālamīn
لاَ شَرِيْكَ لَهُ وَبِذَلِكَ اُمِرْتُ وَأنَا مِنَ الْمُسْلِمِيْنَ
Lā Syarīka lahu Wa Bidzālika Umirtu Wa Anā Minal Muslimīn
Allah the Almighty, the Greatest
All praises be upon Him
Allah The Most Exalted of them all, day and night
I stand before The One Who created the skies and the lands
I sincerely submit to Allah and I am certainly not among those who associate Allah with other beings
Indeed my Solat, my good deeds, my life and my death are all for Allah The Lord of all the worlds
He has no partner nor parallel whatsoever, and I have been ordered as such, and I am from those who embrace Islam.
Check out Muslim.Sg's everyday duas.