My short answer, to the question in the OP’s title, is “I have never kept a rifle by the back door, so have no personal knowledge of a best way to hang a rifle by a door.”
Firearms being positioned near a door are something that a burglar expects to find. A burglar, if successful in getting past the outdoor dogs, will not find a rifle hanging by our back door or side doors. A home diagonally adjacent to us was burglarized, not so long ago. Their large dog was subdued with a golf club, by one of the several burglars.
As I type this, there is a shotgun placed across the arms of a reclining chair, near our front door, but I am nearer the front door, and can reach that shotgun without stretching or taking a step. I placed that shotgun, there, upon entering the room. It will leave the room, with me.
If I lived in a more-rural area, I might well have a rifle handy; probably a lever-action. I have nothing against .223/5.56 for home defense, but the AR15 platform is not my first choice for the task.
On a side note: I have noticed that some people who have no firearms, will, instead, keep a baseball bat or golf club in a small closet, near an exterior doorway. (I worked big-city police patrol for 33+ years, so investigated plenty of burglaries.)