Shaykh Muhammad ibn Saalih al-Uthaymeen rahimahullaah was asked the following question:
Q: Is the (story of) the spider-web and the two doves on the day the Messenger of Allaah hid in the cave of ‘Hira’ (authentically) reported?
A: No, the historians mention: That the Prophet sallAllaahu `alaihi wa sallam –when he hid in the cave of ‘Thawr’ – that the spider spun a web to cover him, and the dove landed on the branch of a tree – this is a lie which has no authenticity.
And it (the like of this story) with regards to the Messenger sallAllaahu alaihi wa sallam has not been mentioned in a single verse of the Quran.
(Furthermore) any person, if a spider were to spin a web (to cover him) and if there was a dove nearby – anybody who saw that would say: “There is nobody here.”
However, with regards to the Messenger sallAllaahu `alaihi wa sallam, then Allaah blinded them (the polytheists) from seeing him. Due to this Abu Bakr (radiyAllaahu `anhu) said: “O Messenger of Allaah! If one of them were to look at his feet they would have seen us.” This indicates that there was nothing to prevent (the polytheists) from seeing them.
So there is nothing authentic regarding the spider and the dove when the Prophet sallAllaahu `alaihi wa sallam hid in the cave of ‘Thawr’.
Because of this (story) many people respect the spider, saying: “Do not kill it; because it spun a web covering the Prophet sallAllaahu `alaihi wa sallam.”
However (they say) the gecko lizard should be killed as it was blowing into the fire that Ibrahim was in (i.e. it was stoking the fire). So for this reason (the spider) is honored (as they claim).
We say: “No, the spider is to be killed if it harms, just like other than it.”
And it does cause harm occasionally, making webs on books and on the wall – so it is killed (in this case). There is even a narration in this regard, but it is weak – with an order to kill the spider -; however it is weak.
[Source: Shaykh Ibn Uthaymeen rahimahullaah official website: http://www.binothaimeen.com/sound/snd/a0016/A0016-229A.rm voice clip from 15:00 mins – 16:39 mins]
Translated by Saad Burbank.