What is the difference between Tahiyat al-Masjid (the prayer of greeting the mosque) and Nafila? Does a Muslim have to do Tahiyat every time he has to pray?
Praise be to Allah, the Lord of the World; and may His blessings and peace be upon our Prophet Muhammad and upon all his Family and Companions.
Nafila prayers (optional and supererogatory prayers) are of two kinds: 1) Restricted Nafila such as al-rwatib the sunnah prayers that are performed before or after the obligatory prayers. This kind includes the two Rak'ahs before the Fajr obligatory prayer, the four Rak'ahs before al-Zuhr and the two after it, the two Rak'ahs after al-Maghrib, the two Rak'ahs after al-'Isha, the two Rak'ahs of al-Duha (forenoon), the Witr prayers and so on. 2) Unrestricted Nafila. This kind includes all optional prayers that have no specific reason nor related to any other prayer. As for Tahiyat al-Masjid (the prayer of greeting the Mosque), it is not a Nafila that is meant in itself, but the Prophet (Sallallahu Alaihi wa Sallam) disliked for one who enters a Mosque to sit before performing two Rak'ahs. The Prophet (Sallallahu Alaihi wa Sallam) also ordered everyone who enters the Mosque to perform two Rak'ahs before sitting. So, whoever enters the Mosque at the time of some prayer and performs any of the supererogatory prayers that are related to any obligatory prayer or performs some obligatory prayer, this will be sufficient for him concerning Tahiyat al-Masjid. Allah knows best.