Abdullah bin Umar reported,

When the Prophet ﷺ passed by al-Hijr, he said, "Do not enter the dwellings of those who wronged themselves, lest there befall you what befell them, unless you are weeping." Then he covered his head and quickened his pace until he had crossed the valley.

Bukhari 4419

Sahih

حدثنا عبد الله بن محمد الجعفي حدثنا عبد الرزاق أخبرنا معمر عن الزهري عن سالم

عن ابن عمر رضي الله عنهما قال

لما مر النبي ﷺ بالحجر قال لا تدخلوا مساكن الذين ظلموا أنفسهم أن يصيبكم ما أصابهم إلا أن تكونوا باكين ثم قنع رأسه وأسرع السير حتى أجاز الوادي

البخاري 4419صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Expeditions
Chapter
Descent of the Prophet ﷺ at Hijr
Numbering
Darussalam 4419
Bukhari 4419