Supplementary Note: Shaykh al-Islām states in his Fatāwā (2/186):
“Some later scholars have maintained that it is permissible to travel to the mashāhid (shrines). They argued that the Prophet ﷺ used to go to Qubāʾ every Saturday, riding or on foot. Their reasoning is unfounded, for Qubāʾ is not a shrine but a mosque, and journeys undertaken specifically to mosques are, by unanimous agreement of the imāms, prohibited, because such travel is not prescribed. Indeed, were a person to set out for Qubāʾ from his own neighborhood with the intention of travel, it would not be allowed. However, if he first journeys to the Prophet’s Mosque and then proceeds from there to Qubāʾ, this is commendable—just as it is recommended to visit the graves in al-Baqīʿ and the martyrs of Uḥud.”
I therefore said:
“Nevertheless, it is not permissible to saddle one’s mount for that purpose, in light of the aforementioned ḥadith,”
namely the Prophet’s ﷺ statement: “No journey is undertaken except to three mosques…,” and this mosque is not among them.
Those, then, are the four mosques for which textual evidence affirms a superiority over all others. As for the remainder, they are equal in merit, though the oldest of them is better because it is further removed from having been built out of spite, boasting, or ostentation, as previously indicated.
Regarding what Ibn ʿĀbidīn reports in his Ḥāshiyah (1/14) from the book Akhbār al-Duwal, through a chain to Sufyān al-Thawrī, that
“Prayer in the Mosque of Damascus equals thirty thousand prayers,”
this report, in addition to being merely mawqūf on Sufyān al-Thawrī, is not authentic from him and is rejected.