You can’t get pregnant from anal sex, but HIV + STDs are still a risk

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. So you still need to use a condom and practice safe sex every time.