Visiting the ruins of the people of Shu’ayb
Question

                In the city of al-Bada’, in the area of Tabook, there are ancient ruins and houses carved out of the rock in the mountains. Some people say that these are the dwellings of the people of Shu’ayb (peace be upon him). My question is: is it proven that these are the dwellings of the people of Shu’ayb (peace be upon him), or is that not proven? What is the ruling on visiting these ruins for the one whose intention is to have a look around, and the one whose intention is to learn a lesson and receive admonition?.
Praise be to Allah.
    What is well-known among the historians is that the dwellings 
    of Madyan, to whom the Prophet of Allaah Shu’ayb (peace be upon him) was 
    sent, arein the north-western part of the Arabian peninsula, which nowadays 
    is called al-Bada’, and the surrounding region. Allaah knows best whether 
    that is true. If that is true, then it is not permissible to visit these 
    places with the intention of looking around, because the Prophet (blessings 
    and peace of Allaah be upon him), when he passed by al-Hijr – which was the 
    dwelling place of Thamood – said: “Do not enter the dwelling places of those 
    who wronged themselves, lest there befall you what befell them, unless you 
    are weeping.” Then he covered his head and hastened until he left the 
    valley. Narrated by al-Bukhaari in his Saheeh from Ibn ‘Umar (may 
    Allaah be pleased with him). 

    According to another report, he said: “Do not enter upon 
    those who are being punished unless you are weeping, lest there befell you 
    something like what befell them.” Ibn al-Qayyim (may Allaah have mercy on 
    him) said, whilst mentioning the lessons and rulings derived from the Battle 
    of Tabook: Another (ruling) is that the one who passes by the dwelling place 
    of those with whom Allaah is angry and who are being punished should not 
    enter it or stay there, rather he should hasten and cover his head until he 
    has passed it, and he should not enter upon them unless he is weeping and 
    learning a lesson. And the Prophet (blessings and peace of Allaah be upon 
    him) hastened through the valley of Muhassir between Mina and Muzdalifah, 
    which is the place where Allaah destroyed the elephant and its people. End 
    quote from Zaad al-Ma’aad, 3/560 

    Al-Haafiz ibn Hajar (may Allaah have mercy on him) said in 
    his commentary on the hadeeth quoted above: This applies to the dwellings of 
    Thamood and others who were like them. Fath al-Baari, 6/380. 

    And Allaah is the source of strength. May Allaah send blessings upon our Prophet Muhammad and his family and Companions. End quote.