Unfortunately I'm not sure it can totally be prevented, as a lot of it is due simply to the hormones causing the pelvis to relax and separate more than normal. However, in my experience there are a lot of things you can do to help lessen the severity of it! I'm at the end of my 3rd pregnancy and I've had SPD with all of them. My first pregnancy I basically did nothing and I was in constant, excruciating pain. My second pregnancy I saw a chiro and PT and got a support belt. This time around I am seeing a chiro again and being very conscious to do absolutely nothing more than the bare minimum as far as carrying things (incl. kids and groceries), walking, etc.
Â
For me, a good chiropractor and not over-exerting yourself physically are the two most key aspects to managing SPD. The third would be doing basic exercises like squeezing a ball between your legs and trying to separate your legs (while bent) outward against an equally opposing force (you can tie a scarf/band around your legs or have someone simply hold your legs together with their hands). I have found that, for the most part, as long as I do not carry anything over a couple of pounds (literally), do not do much walking, and move verrrrrry slowly and deliberately while standing up/rolling over...my SPD symptoms are almost zero. But if I spend a day shopping and thus doing a lot of walking, if I pick up and carry my kids even just a couple yards, if I try to haul in heavy grocery items...I am back to being rendered almost immobile by the pain. 
Â
Good luck to you! I hope you find something this time around that helps!