Ruling on writing verses of the Qur’an on walls and the front of houses
Question

When building houses, some people put a stone on which words of dhikr, such as “Ma sha Allah” are written, on the front of the house. In other words, that stone, along with the other stones in the walls, form a foundation that carries the roof of the house, and anyone who climbs onto the roof of the house feels that he is stepping on that dhikr. Is there anything wrong with that?
Praise be to Allah.Firstly:
It is not prescribed to write Qur’anic verses on walls, and it is disliked (makruh) according to the majority of scholars; some of them described it as haram.
Ibn al-Humam (may Allah have mercy on him) said in Fath al-Qadir (1/169): It is disliked (makruh) to write Qur’an and the names of Allah, may He be exalted, on coins, mihrabs, walls and furnishings. End quote.
Ad-Dardir (may Allah have mercy on him) said in ash-Sharh al-Kabir (1/425):
What appears to be the case is that engraving [of Qur’anic verses] is disliked, even Qur’an [on graves]. And it should be regarded as haram, because it could lead to mishandling and disrespect, as they said.
An example of that is engraving Qur’an and the names of Allah on walls. End quote.
An-Nawawi (may Allah have mercy on him) said in Rawdat at-Talibin (1/80): It is makruh to write it on walls, whether in the mosque or elsewhere, and on garments. End quote.
Shaykh Ibn ‘Uthaymin (may Allah have mercy on him) was asked: What is the ruling on writing verses and hadiths on the walls of mosques? He replied: That is a distraction to people.
As for writing verses on walls, whether in the mosque or elsewhere, it is an innovation (bid‘ah) and there is no report from the Companions to suggest that they used to engrave verses on their walls.
Moreover, engraving verses on walls is a kind of disrespect towards the words of Allah. Hence we find some of them writing verses in a calligraphic style to look like castles, minarets, mosques and the like, shaping the words to make them look like a castle. Undoubtedly this is toying with the words of Allah, may He be glorified and exalted.
Furthermore, even if we assume that the words are written in clear Arabic writing, this is not the way of the righteous early generations.
What benefit can there be in writing verses on walls?
Some people say that it will be a reminder for people. We say: Reminding is done by spoken words, not by writing the verses.
Moreover, sometimes they write on the walls {And do not spy or backbite each other} [al-Hujurat 49:12], and you will find that those who are sitting underneath this verse are gossiping and backbiting people, so it is as if they are mocking the verses of Allah.
Therefore writing verses in mosques and on the walls of houses all comes under the heading of innovation (bid‘ah), as it is something that was not known at the time of the righteous early generations.
As for writing hadiths in the mosque, if it is in the direction of the qiblah, then undoubtedly it is a distraction, because people, even some of the worshippers who are standing behind the imam during the prayer, may steal glances at it. The scholars regard it as disliked to write anything in the qiblah of the mosque.
If that is done in houses, there is nothing wrong with writing a hadith [on the wall] if there is some benefit in it, such as the supplication offered as expiation for a gathering (kaffarat al-majlis): “Subhanak Allahumma rabbana wa bi hamdik, ashhadu an la ilaha illa anta, astaghfiruka wa atoobu ilayk (Glory and praise be to you, O Allah our Lord. I bear witness that there is no god worthy of worship except You. I seek Your forgiveness and I repent to You),” then this serves as a reminder."(Liqa’ al-Bab al-Maftuh 197/13).
See also the answer to question no. 254, in which there is a discussion of the negative consequences of hanging verses on walls, most of which are also applicable to writing directly on the walls.
Secondly:
With regard to sitting on the roof of the house, which rests on the walls on which, or on parts of which, Qur’an has been written, there is nothing wrong with it, and it is not like sitting on the Qur’an, because who sits on walls?! Rather they sit on the roof, away from the walls.
As for your saying “anyone who climbs onto the roof of the house feels that he is stepping on that dhikr,” this comes under the heading of waswasah (intrusive thoughts; whispers from the shaytan).
Beware of getting carried away with it, because waswasah is a serious problem and a great evil; may Allah keep us all safe and sound.
The remedy for waswasah is to ignore it and pay no attention to it, whilst also reciting a great deal of dhikr and doing acts of worship.
And Allah knows best.