Get carpet treated with Scotchguard or other stain proof treatments. These are based on Teflon, and greatly reduce the carpets absorption of liquids and other substances. They are not 100% stain proof, but they are a huge improvement for many carpets. Organic materials like wool benefits the most; synthetic nylon benefit very little.
Scotchguard needs to be reapplied every 6 months.
Steam cleaning should be done every 6 months. This will take up a day while you wait for the carpet to dry, but the life of the carpet is significantly extended, making the procedure well worth it. Steam cleaning removes the deeper particles that cause the carpet to be worn away.
It is a good practice to scotch guard carpet just after a steam cleaning. This will help preserve the surface till the next cleaning.
Air carpet when first installed. Carpets do contain formaldehyde, which is harmful when exposed to long term, though they have much less of this chemical than many plastics or item of furniture. Use Pot plants to soak up these chemicals and have a better smelling cleaner atmosphere in your home. Some people use bicarbonate of soda on the new carpet for the first few days.
Have a small sample of you carpet to use for test cleanings. See if any spot cleaners or stain removers harm the sample carpet. This is a very good indication of which substances to use for the house carpeting.
Use plastic separation coasters under furniture legs to stop the carpet being flattened. Some people use carpet offcuts under heavy items like pianos; this will reduce carpet indentation. Just putting a rug under heavy item like a sofa can prevent many flat fibre problems.
Train pets well. Pet urine is difficult to deal with. A UV light can help find a urine spot. White vinegar and baking soda make an effective cleaner. Leave baking soda on stains overnight will help absorb the smell.