Allah has never authorised, for in the Book and the Sunnah there is (1) mention only of mosques, not of shrines. The Exalted says: “Say, ‘My Lord has commanded justice; set your faces upright at every mosque and call upon Him, devoting the religion sincerely to Him alone.’” (al-Aʿrāf 29). He also says: “Only those who believe in Allah and the Last Day shall maintain the mosques of Allah.” (al-Tawbah 18). And He says: “And the mosques belong to Allah, so do not invoke anyone along with Allah.” (al-Jinn 18). And He says: “Do not approach them while you are in retreat in the mosques.” (al-Baqarah 187). And He says: “Who is more unjust than one who prevents the name of Allah from being mentioned in His mosques?” (al-Baqarah 114).
It is authentically reported from him ﷺ in the Ṣaḥīḥ (2) that he said: “Those before you used to turn graves into places of worship. Beware! Do not turn graves into mosques; I forbid you to do that.”
This is the last part of Shaykh al-Islām’s reply, and Allah, the Glorified, knows best.
***
He has many other statements on this subject, as he indicated in the answer. When they obtained this reply in Damascus they copied it and dispatched it to the Egyptian lands, and the Shāfiʿī judge wrote on it: “I have compared the answer to this written question ⦗122⦘ with Ibn Taymiyyah’s own handwriting and found it accurate.” He then said: “What is actually at issue (3) is that he treats visiting the grave…"