The Chimney Safety Institute of America recommends four preventative measures to help save homeowners the expense of large masonry repairs:
A well-designed cap will keep out rainwater and will also prevent birds and animals from entering and nesting in the chimney. Caps also function as spark arrestors, preventing sparks from landing on the roof or other nearby combustible material.
2. Repair or Replace a Damaged Chimney Crown
Crowns should project beyond all sides by two inches to help prevent erosion of the brick and mortar in the chimney's vertical surfaces. A cast crown with an expansion joint is an ideal long-lasting replacement for the more commonly-found sand and mortar washes.
3. Repair or Replace Flashing
Flashing is the seal between the roofing material and the chimney that prevents rain water from running down the chimney into living spaces where it can damage ceilings and walls and cause rafters and joists to rot.
4. Waterproof your Chimney
Common brick is like a sponge, absorbing water and wicking moisture to the chimney interior. Defective mortar joints or the use of improper mortar or brick can greatly increase the tendency to absorb and convey water to the interior of the masonry chimney structure.
Annual chimney inspections and preventative chimney maintenance is best left to a qualified chimney professional, like a CSIA Certified Chimney Sweep.
Source: http://www.csia.org/