When a proper chimney is built, the builder should fit a lead tray just above the point where the chimney comes out of the roof.
This tray goes completely through the chimney, with a turn up all round the inside, and another turn up on three of the outside edges, the remaining edge is turned down, with flashing under to direct the water from the chimney onto the roof.
This tray collects all the rain that soaks into the chimney and stops it from going down the stack into the home.
If you do not have a tray, and many homes do not, you need to check that the pointing is intact, if its not, repair it, then paint the entire outside of the chimney with a waterproof silicon liquid, this is transparent and while it makes the outside of the chimney look slightly darker, no one except you will notice.
This silicone coating will cause the rain to run off, rather than soak in.
If you are good with heights its a DIY job.