Is it ok to have pets in Hinduism and if so, what pets are ok and which are not ok?
Moreover, is there a proper protocol for raising pets? In general, views from Shastras would be very helpful.
Hinduism Stack Exchange is a question and answer site for followers of the Hindu religion and those interested in learning more about Hinduism. It only takes a minute to sign up.Sign up to join this community
Some pets like dogs, cats, birds are usually kept in houses.
But certain animals are not allowed according to the Shastras. A verse in the Skanda Purana says people who keep pets like cats, cocks, hens, dogs and birds fall to a river called Vaitarani river which is situated into a hell.
One who keeps cats, cocks and hens, dogs and birds, one who sets fire to the houses of the deaf and blind as well as grasses and grains and other things in the fields and one who sustains himself by means of stagecraft and stellar calculations(astrology) - all these men go to Vaitarani. [19-20]
Above verse occurs in the Skanda Purana, Kaumarika Khanda, Chapter 39 as a part of conversation between Arjuna and Narada. The above verse is said by Sage Narada.
So, According to Skanda Purana, keeping above animals as pets leads to hell.
Also from the Mahabharata, Indra says to Yudhishtira when he reached heaven. In this chapter of Mahaprasthanika Parva
"Indra said, ‘There is no place in Heaven for persons with dogs. Besides, the (deities called) Krodhavasas take away all the merits of such persons. Reflecting on this, act, O king Yudhishthira the just. Do thou abandon this dog. There is no cruelty in this.’
Having said that, Hinduism is not against animals or loving them. Perhaps Devarshi Narada's words suggest that we should let the animals and birds free and not cage them for our own entertainment.
In the former verse to the above verse, Narada says..
One who harasses animals on false pretexts falls into viśasana; on who makes weapons illegally falls into Adhomukha. One who sides with and supports evil men and things and takes food in isolation, falls into pūyavāhaka. 
So, it should be noted that we should not harass or punish animals or beings lesser to us.
Śrīmad-Bhāgavatam further says that we should treat some animals like own children.
One should treat animals such as deer, camels, asses, monkeys, mice, snakes, birds and flies exactly like one’s own son. How little difference there actually is between children and these innocent animals. [SB 7.14.19 ]
As per the following verse each household should have at least a black (!) cat and a goat.
- One should keep in his house the following things : the wood for striking out a sacrificial fire, a black cat, sandal-wood, a precious stone, ghee, sesamum seed, a black skin, and a goat.
ParAshara Smriti, Chapter 12, Verse 47.
So, those animals should be allowed as pets.