Belly bands are great for male dogs. I use them and so do several people here on YT. They are like a diaper for male dogs only it wraps around them instead of being an actual diaper. They are made with an absorbent material so you don't have to worry about it getting everywhere. They usually have a velcro fastener that keeps them on good and the dogs don't mind it once it they get use to it. You can get them at several places,
www.barkindogclothes.com is a good place to get them, I believe they have a picture as well as what they look like and how they are put on.