According to a popular saying; “dogs are human beings best friends”. Dog serves as security animals that have a sense of consciousness and can detect strange and suspicious activities even though Islam forbids Muslims to keep dogs.
Muslims are recommended to make dua when hearing a dog barking at night, especially without any apparent reason. The purpose of reciting the dua is to seek protection from Allah from Shaytan.
Below is the dua to recite when you hear a dog barking at night:
أَعُوذُ بِاللَّهِ مِنَ الشَّيْطَانِ الرَّجِيـمِArabic
‘A ‘oothu billaahi minash-Shaytaanir-rajeem.Transliteration
“I seek refuge in the perfect words of Allah from the evil of what He has created.”Translation
This dua above was reported by Prophet Muhammad (ﷺ) and has been graded authentic in Al-Bukhari 7/99, Muslim 4/2015.
Another authentic hadith also emphasizes the issue of making dua when hearing the barking of dogs and the braying of donkeys.
When you hear a dog barking or a donkey braying in the night, then seek refuge in Allah from them, for surely they have seen what you see not.Abu Dawud 4/327, Ahmad 3/306. Al-Albani graded it authentic in Sahih Abu Dawud 3/961.