Whether your roof is brand-new or years old, here’s what you need to do to keep it in the best possible shape for the longest possible time.

A new roof is an expensive proposition — $18,800 on average for composition shingles, according to Remodeling magazine’s Cost Vs. Value Report, and as much as $36,000 for high-end materials. Once you’ve made that kind of investment, you’ll want to protect it.

And even if your roof is years old, maintaining it in good shape will prolong its life and keep you from having to replace it prematurely. Here’s what you need to do to get the most from your roof.

Clean the Gutters

Ruined paint on siding and a wet basement are typical problems caused by clogged gutters, but it might surprise you to learn that the overflow can also go upward. When leaves pile too deeply in gutters, water can wick into roof sheathing and rot it, or even rot roof rafters.

Fixing that kind of damage could run into the thousands of dollars, but you can avoid it by cleaning your gutters each fall and spring. Do it yourself in a few hours if you’re comfortable working on a ladder, or hire a pro for $50-$250, depending on house size.

Related: Fast Fixes for Common Gutter Problems

Remove Leaves

If you have a simple peaked roof surrounded by low landscaping, your roof probably stays clear of leaves on its own. But if the roof is more complicated or if towering trees are nearby, piles of leaves probably collect in roof valleys or near chimneys. If you don’t remove them, they will trap moisture and gradually decompose, allowing moisture to accumulate in your roof — or worse, create fertile ground for weeds to grow.

If you have a low-slope roof and a one-story house, you may be able to pull the leaves down with a soft car-washing brush on a telescoping pole. Or you can use a specialty tool like a roof leaf rake, which costs about $20. A leaf blower gets the job done too, especially on dry leaves, but you or a pro needs to go up on the roof to use it.

If leaves are too wet or too deep, you might need to wash them off with a garden hose. Don’t use a pressure washer, which can force water up under the shingles.

Get Rid of Moss

In much of the country, composition roofs often become covered with black algae. Although unsightly, this filmy growth doesn’t hurt the roof. A little chlorine bleach or detergent mixed with water will kill it, but it’s safer for both you and the roof to just leave it alone.

If you live in the Northwest, you’re likely to find moss growing on your roof, particularly on wood or composition shingles. Moss, which looks more three-dimensional than algae, needs to go because it traps water. If you tackle it early enough, you can just sweep it off.

If there’s a lot of buildup, you may need to kill the moss first. The Washington Toxics Coalition recommends using products based on potassium salts of fatty acids rather than more toxic formulas with zinc sulfate. Even so, apply the soap only where moss is growing, and try to keep the wash water from getting into storm drains.

Once the roof is clean and free of moss, consider investing in zinc strips to keep it from coming back. For about $300, a roofer will install strips near the top of the roof. When it rains, the runoff from the strips inhibits the growth of moss. It’s effective and more environmentally friendly than treating the entire roof with pesticide, as long as you don’t live near a stream or a lake where the runoff can harm aquatic life.

Trim Overhanging Branches

A little prevention in the form of tree-trimming goes a long way toward keeping leaves and moss off your roof and keeping your roof damage-free. Abrasion from limbs and leaves that touch your roof can eventually damage shingles, especially in high winds.

Overhanging branches also give squirrels and other rodents access to your roof. They can gnaw on your roof and siding. Branches need to be 10 feet away from your roof to keep these pests at bay. If that’s not possible, wrap the tree trunk with a sheet-metal bank to prevent them from climbing the tree.

Trimming branches that hang over the roof is a job for a pro, though, or you might cause more damage than you prevent.

Related: The Best Trees for Your Yard

Prevent Ice Dams

If you’re plagued by ice buildup on the roof, removing some or all of the snow between storms might forestall leaks into your house. Don’t try to pry off ice that’s already formed, since that could damage the roof. Use a roof rake to dislodge snow within three or four feet of the gutters. Get a telescoping pole and work from the ground, if possible. If you must be on a ladder, work at an angle so the falling snow doesn’t push you over.

Inadequate insulation and air leaks into your attic greatly increase the risk of ice dams, so once the storms pass, address those problems, too.

Look and Listen

After every big wind or hail storm, or if you’ve heard scurrying on the roof at night, give your roof a quick check to make sure everything’s still intact.

Look for:

  • Curling, loose, or missing shingles
  • Damaged flashing around vents, chimneys, skylights, and other openings

If anything seems amiss, ask a roofer to inspect ASAP. Most problems are fairly easy to fix, but if you put them off and water gets in, the damage and costs escalate.

TIP: You don’t have to climb a ladder to inspect your roof. You can use binoculars.