Non-Muslims are generally welcome to visit mosques in Egypt; however, it is always advisable to seek permission before entering mosques outside Cairo and Alexandria where people are less accustomed to tourists.
Tourists and foreigners are welcome in almost all mosques in Egypt, except mosques where the relatives of the prophet Mohamed were buried like the Mosque of El Hussein and the Mosque of Sayeda Zeinab.
Tourists are more than welcome to visit most mosques at anytime expect when they are being used for prayer, on Friday and during the five prayers of the day.