Praise be to Allah.
Is it haram to keep a dog?
It is haram to keep a dog unless it is for the purposes for which Islam permits keeping dogs. Whoever keeps a dog – except a dog for hunting or farming – his reward will decrease each day by one or two qirats.
Ibn ‘Umar (may Allah be pleased with him) said: “I heard the Messenger of Allah (peace and blessings of Allah be upon him) say: ‘Whoever keeps a dog, except a dog that is trained for hunting or a dog for herding livestock, his reward will decrease each day by two qirats.’” (Narrated by al-Bukhari, 5059; Muslim, 2941; according to another version narrated by them both, “one qeirat”).
The word qirat refers to a large amount of reward; if a person’s reward decreases by one qirat, that means that he is sinning, for losing reward is like earning sin, both indicate that something is haram because of the consequences it leads to.
The impurity of dogs is the greatest of animal impurities. The impurity of a dog can only be removed by washing seven times, one of which should be with earth. Even pigs, which the Quran states are haram and describes as an abomination (rijs) are not najis (impure) to such an extent.
Dogs are impure and filthy, but unfortunately we find that some people are attracted to the ways of the disbelievers and their filthy habits, so they have started to keep dogs unnecessarily for no reason, keeping them, training them and cleaning them even though they can never be clean, even if they were washed with the waters of the ocean, because they are essentially impure.
Our advice to them is to repent to Allah and to get the dogs out of their homes.
But in the case of dogs which are needed for hunting, farming and herding livestock, there is nothing wrong with that because the Prophet (peace and blessings of Allah be upon him) gave permission for that.
What to do after touching a dog
If you touch a dog when it is not wet, then your hand does not become impure, but if you touch it when it is wet, this means that the hand becomes impure, according to the opinion of many scholars, and the hand must be washed seven times, one of which should be with earth.
With regard to vessels, if a dog has licked a vessel (i.e., drunk from it), then the vessel must be washed seven times, one of which should be with earth, as was proven in al-Sahihayn and elsewhere, in the hadith narrated from Abu Hurayrah (may Allah be pleased with him) who said that the Prophet (peace and blessings of Allah be upon him) said: “If a dog licks the vessel of any one of you, let him wash it seven times, one of which should be with earth.” It is better if the washing with earth be the first washing. And Allah knows best. (Majmu’ Fatawa al-Shaykh Muhammad ibn ‘Uthaymin, 11/246; Fatawa Islamiyyah, 4/447)
And Allah knows best.