KNOW THAT TO pray for blessings upon the Messenger of Allah
after the last tashahhud is wājib according to ash-Shāfi‘ī. If one leaves it out, his ṣalāh is invalid. It is not wājib to pray for blessings upon the family of the Messenger of Allah
in it, but it is mustaḥabb. The best salutation on the Prophet
is to say: O Allah, send salutations upon Muḥammad, Your servant and Messenger, the unlettered Prophet, and upon the family of Muḥammad, as You sent salutations upon Ibrāhīm and the family of Ibrāhīm. And bless Muḥammad, the unlettered Prophet, and the family of Muḥammad, as You blessed Ibrāhīm and the family of Ibrāhīm in [all] the worlds. Truly You are most Praiseworthy, most Majestic.

Allāhumma ṣalli ‘alā Muḥammadin ‘Abdika wa Rasūlika-n-Nabiyyi-l-ummyyi, wa ‘alā āli Muḥammadin wa azwājihi wa dhurriyyatih, kamā ṣallayta ‘alā Ibrāhīm wa ‘alā āli Ibrāhīm, wa bārik ‘alā Muḥammadi-n-Nabiyyi-l-ummiyyi, wa ‘alā āli Muḥammadin wa azwājihi wa dhurriyyatih, kamā bārakta ‘alā Ibrāhīma wa ‘alā āli Ibrāhīm, fi-l-‘ālamīna, innaka Ḥamīdun Majīd.
We have narrated this method in the Ṣaḥīḥs of al-Bukhārī and Muslim from Ka‘b ibn ‘Ujrah from the Messenger of Allah
except for a part of it, but it is ṣaḥīḥ in narrations other than that of Ka‘b. Details will be provided in the Book of Sending Blessings on the Prophet
, Allāh willing. And Allah knows best.
The compulsory part of it is to say: O Allah, send salutations upon Muḥammad.
Allāhumma ṣalli ‘alā Muḥammad.
If a person wishes he may say: May Allah send salutations on Muḥammad. One may also say: May Allah send salutations on His Messenger, or: May Allah send salutations on the Prophet.

Ṣallā-llāhu ‘alā Muḥammad.
Ṣallā-llāhu ‘alā Rasūlih.
Ṣallā-llāhu ‘ala-n-Nabī.
Ṣallā-llāhu ‘alā Rasūlih.
Ṣallā-llāhu ‘ala-n-Nabī.
We have a viewpoint that it is not valid to say anything but O Allah, send salutations upon Muḥammad, we have a viewpoint that it is valid to say And may Allah send salutations on Aḥmad; and a viewpoint that one says May Allah bless him.
In the first tashahhud it is not wājib to pray for blessings upon the Prophet
. Is it mustaḥabb? There are two opinions. The more correct view is that it is mustaḥabb to do so but it is not mustaḥabb to pray for blessings upon his family. It is not mustaḥabb to make du‘ā’ in the first tashahhud in our opinion. Some of our colleagues hold that it is makrūh because it is based on brevity, unlike the second tashahhud. And Allah knows best.