Abdullah bin Umar reported,

When the Prophet ﷺ passed by al-Hijr, he said, "Do not enter the dwellings of those who wronged themselves unless you are weeping, lest there befall you what befell them." Then he covered his face with his cloak while seated on his mount.Wazad in another narration, "Then he covered his head and hastened his pace until he had crossed the valley."

Azami 8363

Sahih

عن عبد الله بن عمر

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

الأعظمي 8363صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Stories of the prophets
Chapter
News of Adam عليه السلام
Section
Accounts of the Prophet of Allah Salih عليه السلام
Numbering
Jami al-Kamil 8363 (2nd edition)
Azami 8363