Answered by Shaykh Amjad Rasheed
Is it permissible to pet dogs?
Dogs are filth, according to our school and according to the majority of scholars [f: because of the explicit hadiths from the Prophet (peace and blessings be upon him) that establish this]. Thus, if touching the dog would affect one with filth, such that the dog or one’s hand was moist, then touching it without need would be haram. This is because one is applying filth to oneself and this is haram. However if there is no moisture, then there is no prohibition in touching them, but is better to avoid them.
Amjad Rasheed
[Translated by Sr. Shazia Ahmad]