The best way to vent a dryer indoors is to use an indoor dryer vent kit when outdoor venting of the dryer is not possible.
If you can vent the dryer outdoors it's best to vent the dryer outdoors.
You could also use a bucket with a lid and cut a hole into it for the dryer vent hose to fit into and create other holes for venting.
Then add some water to help with moisture.
It is against code in most states to vent a dryer inside as the International building code and other building codes require a dryer exhaust to be vented to the outside.
Venting a dryer indoors can be a safety risk and even negatively affect the indoor air quality.
The reason you can't and shouldn't vent a dryer inside is because venting the dryer indoors can make the indoor air quality worse by causing dust, lint and harmful chemicals from laundry detergent and dryer sheets into the home.
And with gas dryers it can cause dangerous carbon monoxide poisoning due to the exhaust fumes.
Dryer exhaust also contains particles such as dust and lint which can irritate allergies and respiratory issues when it's circulated indoors.
Dryer exhaust vented indoors can also cause excessive moisture and can lead to structural damage and mold growth.
It is better to vent a dryer through the wall instead of the roof.
Venting a dryer through the wall is better as it makes for easier cleaning and easier access and allows the dryer to vent better and work more efficiently.
Dryers that are vented through the roof cause the dryer to be less efficient and are harder to keep clean of lint which can cause a fire hazard.
A dryer vent should be insulated in the attic to prevent condensation buildup inside the vent.
Attics are often unheated and temperature fluctuations in the attic can cause condensation to buildup in the attic vent and cause issues.
However there is no mandate or requirement that you have to insulate your dryer vent but it's a good idea to do so.
Roof dryer vents should not have a screen as the screen can accumulate lint and restrict airflow and create a fire hazard.
Roof dryer vents and wall mounted dryer vents should only have a flap that closes when the dryer is not operating.
Lint should be allowed to freely flow out of the dryer vent and not be restricted.
A dryer vent can go straight up and out the roof if you don't have an external wall to vent the dryer through.
The less bends in a dryer vent the better as it prevents dryer lint from becoming trapped in the vent and possibly causing a fire.
It is against code for a dryer to be vented through the roof in some places although in some areas they allow the dryer to be vented through the roof.
If the home has an exterior wall in the laundry room, then the dryer should be vented through the wall at ground level but if the laundry room has no exterior wall then venting the dryer through the roof is okay but you could also vent the dryer through the floor and then out the side of the house.
It is not code in most places for a dryer to be vented through the roof as it's better to vent the dryer through a wall.
Some places do allow for a dryer to be vented through the roof but if you can you should vent the dryer through the wall which provides easier access for cleaning.
Most building codes recommend that you vent a dryer through a side wall that is near ground level for easiest access to clean the dryer vent.
It is safe to vent a dryer through the roof when installed properly and when you ensure you keep the dryer vent and tubes clean and free of lint.
However if not cleaned often enough then it can possibly start a fire when you have the uncleaned dryer vent through the roof.
The same is true with a dryer vented through the wall if it's not kept clean.
Dryer vents through the wall are easier to keep clean than dryer vents through the roof but they both can start a fire if not kept clean.
Builders often put dryer vents on roofs for a variety of reasons which includes aesthetics and space efficiency and to prevent animal entry.
Roof dryer vents can discourage animals from getting into the dryer vent like they would if it were on the wall lower to the ground.
Roof dryer vents are also more aesthetically pleasing than dryer vents mounted on the outside wall.
venting a dryer through the roof can also be space saving for homes that have limited exterior wall space like condos and town houses.
However venting a dryer through a roof makes it harder to keep the dryer vent clean and free of lint which can buildup in the dryer vent.
With a roof dryer vent you would need to get up on the roof to get the lint clean from it.
Dryer vents that are vented through the wall are easier to keep clean than roof dryer vents.
Wall mounted dryer vents also make the dryer work less hard.
Roof dryer vents causes the dryer to work harder to dry the clothes.
My house had a dryer vent on the roof when I bought it and I installed a wall mounted dryer vent instead which is much better.
Venting dryers to a roof termination or roof cap instead of through a wall is very common in the south.
This is because many laundry rooms are located in the middle of the house, and so many homes are single story with easy to walk on roof slopes (about 6/12), venting your dryer through the roof makes the most sense in those cases (due to the shortest run, with the least amount of elbows).
However if your laundry room has an exterior wall then it's best to vent the dryer through the wall instead of the roof.