All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His Slave and Messenger.
The best way to safeguard houses from the plots of magicians and evil people is to recite the Quran in them, especially Surah Al-Baqarah (Quran 2). It is narrated on the authority of Abu Hurayrah that the Messenger of Allaah, sallallaahu ‘alayhi wa sallam, said: “Make not your houses as graves (by abstention from reciting Quran in them). Verily, Satan flees from the house where Surah Al-Baqarah is recited.” [Muslim]
It is further reported from Abu Hurayrah in a Mawqoof Hadeeth (i.e. a Hadeeth which is a statement of a companion who did not ascribe it to the Prophet, sallallaahu ‘alayhi wa sallam) that he said: “No doubt, the house, where the Quran is recited, becomes vast for its dwellers, is inhabited by the angels, deserted by devils, and receives much good; and the house, where the Quran is not recited, becomes narrow for its dwellers, is deserted by angels, inhabited by devils, and receives little good.” [Ad-Daarimi] The same applies to performing prayer in them. It is narrated on the authority of Jaabir that the Messenger of Allaah, sallallaahu ‘alayhi wa sallam, said: “If anyone of you finishes his prayer in the mosque, let him give a share of his prayer to his house, for Allaah will grant his house with good because of his prayer (in it).” [Muslim]
There is no harm, Allaah willing, in what has already been mentioned in the question of safeguarding the house by means of sprinkling in it the water on which the Quran has been recited. Shaykh Ibn Jibreen was asked about that and he said, as mentioned in his website, under Fatwa no. 12839:
Fatwa title: sprinkling water and salt in the corners of the houses inhabited by jinn and devils.
Question: What is the ruling on sprinkling water and salt in the corners of houses inhabited by jinn and devils, as a physical means to safeguard them from their harm, by Allaah Almighty’s leave, given that jinn and devils exist more often in corners, and dislike and detest salt?
Answer: There is no harm to put salt in the water until it dissolves and then sprinkle it in the corners of the house from the inside and outside. This has been tried and proven beneficial in guarding houses, driving out the rebellious jinn, and being safe from their harm. They may have authority over some reciters and therapists, in which case, it is permissible to use that which may serve to safeguard the people from their evil and harm. It is also valid, under Sharee‘ah, to recite some Athkaar (forms of the mention of Allaah) and relevant Sharee‘ah supplications into the water and then sprinkle it in the house where jinn and devils exist: it will keep them away, by Allaah Almighty’s leave; and indeed it is Allaah Who cures. (End quote)
As for safeguarding houses by putting some Quranic verses of Ruqyah in bottles or so in such a way that is not considered a humiliation to the Quran, and burying that in the earth, then this apparently takes the same ruling of the Tameemah (amulet). For information about the ruling on amulets, please refer to Fatwa 84878.
Allaah Knows best.