Carpets are known to draw all the dust mites, germs, hair (of all creatures), blight, mustiness. But, if one takes care of carpets, they will no doubt have a very long life.
# 1 Keep it speckless
Make it a habit to vacuum your rugs and carpets, regularly, so that all the dust mites, germs everything else is taken in from the cleaner. This became all the more important if you have pets living with you. Vacuuming it on a regular basis will keep the carpets as if they are just newly brought from market.
The cleaner has to be worked on the carpet twice or thrice (depending upon how much dirt it has gathered) so that the carpet is absolutely clean.
# 2 Avoid keeping them where you most of the time have to rush
If you have placed your carpet in the kitchen area, door, or any other area of the home, where a lot of roaming around is involved, then you must think of safeguarding these areas, with either normal rugs or something else. Hence making the carpets safe from all sort of dirt and also your work of cleaning the carpets every day will be lessened.
If you cover them with plastic carpet protector mats, then you will be having an advantage of the carpet visibility via plastic.
# 3 Clean away anything spilt or dropped on them, immediately.
If you accidentally spill anything on carpets and let them a sit is, thinking that cleaning can be done later. Then, sorry, to say but, you care least for your carpets because then the stains will get embedded into the carpet and it will be next to impossible for you to have it cleaned. So, do it at the earliest.