“Whenever you intend to leave your house you should pray two rak’ah right before you leave. These rak’ah will protect you from harm while outside. And when you come back home you should pray another two rak’ah. They will safeguard you from harm in your house.”
Shaykh Al-Albaanee [rahimahullāh] said in his Silsilah Saheehah 3/315:
“This isnad of this hadeeth is acceptable and the narrators are trustworthy men used by Bukhari.”
This hadeeth is mentioned in Al- Muntaqah (12/69/1), Al-Bazaar in his Musnad(81), Ad-Daylamee in his Musnad (1/1/108), and Abdul-Ghani in Akbar-As-Salaah(1/67 and 2/68).