UTI at 6 weeks

Samantha
Hello ladies.
Have any on you gotten a UTI and taken antibiotics and had your baby be fine? 
I've been trying to self treat (I get them all the time) with Cranberry and lots of water. But now I'm just concerned everything will hurt the baby. But the UTI is so painful and making it feel like I have cramps. 
I have also had spotting for my whole pregnancy so far so I don't want to eock the boat and do anything that could risk losing the baby. 
I personally do not want to have to take perscription drugs while pregnant unless I absolutely have to. But I have read so many things about antibiotics for UTIs leading to miscarriage. I am also allergic to penicillin so I have no idea what they would have to give me. 
This will be my first baby. I lost my first one due to being an ectopic pregnancy.