Help with DDoS's

Hello all,

Well, Im running a server with XAMPP, and I recently get DDoS’s, I know how to block them from the server, but I’m not always on which is obvious so I can’t always monitor traffic.

So what my question is, is there a way to stop DDoS’s?