U can’t get pregnant from anal sex, but it’s much riskier for HIV & STDs.
Having anal sex instead of vaginal sex will not stop you from catching or spreading STDs. You certainly can get an STD if you have anal sex with someone who has an infection, even if you can't tell there is an infection by looking. Viruses like HIV and herpes, as well as other infections like chlamydia and gonorrhea can infect through the anus, as well as the vagina. In fact, anal sex with an infected partner is one of the most likely ways of getting HIV. So you still need to use a condom and practice safe sex every time.