It depends on what you mean by safer. You can’t get pregnant from having anal sex, but anal sex without a condom or internal condom has one of the highest risks of STIs of any kind of sex. The skin of the anal cavity is made up of permeable mucous membranes which means it’s more delicate and absorbs more than regular skin, including the bacteria and viruses that cause STIs. And small tears and cuts are common during anal sex—especially if you’re not using enough lube—which creates additional points of entry for bacteria and viruses and increases the receiving partner’s chances of getting an STI from anal sex.
To protect yourself while having anal sex, use plenty of lube and a barrier method, like condoms or internal condoms with the inner ring removed (just not both types of condoms at the same time).