The most important things that you need to consider in keeping your pet rat healthy and happy are going to be; socialization, an appropriate diet, and an appropriate environment that allows them to exhibit their normal and natural behaviors. Generally, keeping pet rats as a caged type of pet tends to be a little bit simpler for a lot of people.
Keeping them happy involves making sure that you give them enough time. You spend enough time with them so that they have the appropriate social interaction. That's the basis of why you have them, and that does become very important to the rats as well.
Appropriate feeding and nutrition is also vitally important. Making sure they're on an appropriate type of rodent type block as part of their feeding. Making sure they're not becoming obese, or overfed, or eating too much junk food. Making sure that people are not offering them too many high salt or high fat types of food, or offering them a diet that's really inappropriate is also going to be an important factor. Water should be available, free choice, at all times for them.
It's also important that their environment and that their cage stay very clean. Rats are sensitive to some types of diseases that may be related to the cleanliness of their home environment.
So, keeping them safe, keeping them clean, making sure that they have proper nutrition, proper diet, they're not overfed, they're not overweight, and that they're socialized and have a lot of interaction and human time is going to keep them happy and healthy as well.
The second aspect of keeping them healthy is regular veterinary visits. It's often recommended that they have checkups, weights, and time spent with a veterinarian who understands rats, on at least a yearly basis. Some people will actually choose that their rat should visit the veterinarian twice a year owing to the fact that most rats may only live two and a half to maybe three years. But at least an annual visit. At least a checkup when you first adopt a new rat.
Having them seen and monitored is going to promote health and allow your veterinarian to share with you information on keeping them better. Providing them with the right nutrition and the right care is going to keep your pet rat happy, healthy, and ensure they live the longest possible lifetime.