If I'm going to be leaving in the next few minutes, I may keep them on. But generally I just take them off and leave them by the door.
But I'm not overly uptight about it. When people come they can take off their shoes or leave them on. Whatever is most convenient. I'll get people coming over for a short visit, see me without my shoes, and decide they need to take theirs off. I appreciate that they are observant and trying to be respectful, but I usually tell them they can keep their shoes on if they like.
Outside of bedrooms, most of our home has wood or linoleum floors with a rug. Rugs are easy enough to clean or replace if they get worn or soiled. And the other floors sweep and mop easy enough.