Installing two bathroom exhaust fans

I'm putting in a bathroom exhaust fans into two adjoining bathrooms that never had an exhaust fan installed by the builder.
My question is, the two fans will be no further than a few feet apart. I bought fans that have a one way flapper. Can I simply join the ducts from both of them in the attic and vent out of one roof vent?
Venting out of the side of the attic wall is also an option as it's only a few feet away, but I assume venting out to the roof is best?
Also, is there a website that shows in detail how to install the roof caps?
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Check with your local building department. This was nixed quite a while a go where I live.

the shorter the pipe and the less bends the better. Where I live the vent on the fan is 3 inch and they run 4 inch pipe. Personally I do not like cutting holes in the roof. Unless there is no other way

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

I did this 2 years ago and it passed inspection.
Ken
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

HomeOwnersHub.com is a website for homeowners and building and maintenance pros. It is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.