According to the International Code Council (ICC), a nonprofit organization that develops building codes and guidelines for residential and commercial construction, only smooth, rigid metal ducting should be used for dryer vents. Underwriters Laboratories (UL), which has published product safety guidelines for more than 100 years, also approves of flexible aluminum ducting. Under no circumstances should you use plastic, vinyl or PVC, as these can create a fire risk and other potential problems.
The direction of a dryer vent is not as important as its length. In general, a shorter path is always better, because it takes less energy to push the air through and there is less surface area to collect moisture and lint. You may be able to find the specific recommended maximum vent length for your dryer in an owner's manual or on the manufacturer's website. Also, reduce the recommended length by 2.5 feet for each 45-degree turn and 5 feet for each 90-degree turn in your vent path.
Most dryer ducts include at least one bend or turn, especially if you plan to vent your dryer upward. If possible, keep these to a minimum, as they make it harder for the dryer to push the air ahead and can increase the likelihood of lint and moisture accumulation. Wherever you can, use 45-degree bends rather than 90-degree turns. Be sure to connect and seal your joints using metal foil tape, and never use duct tape or sheet metal screws.
Dryer vents caps or exhaust hoods are designed to keep air and moisture from flowing back into the ducting from outside. When venting upward through the roof, do not cap your duct with a regular roof vent. These vents are fine for bathroom fans and attic temperature control, but they often include filters or screens, which can trap lint, clog the vent, reduce the dryer's efficiency and create a fire risk.
If your ducting will pass through an unheated attic or other space, you should surround it with insulation. This will help keep cold temperatures from causing condensation inside the duct and creating a moisture problem.
Even with the best vent design and installation, lint can build up over time. It is easy to minimize this problem by cleaning out the vent and ducting once a year with a dryer vent brush.