I like to keep my apartment floor clean, as I enjoy walking around with bare feet after a shower without having to worry about them becoming dirty. As such, I don't like shoes beyond the doorway in my apartment.
When I have friends over they'll often forget about my no shoes policy and come right in with their shoes on.
I have a shoe rack right next to the door as a visual reminder for those who come over and I also try to bring up the topic of shoes on the way to my apartment with my more problematic friends, but they'll still forget or not realize that I don't want them walking around the apartment with their shoes on.
How can I enforce my no shoes policy to prevent people from coming into my apartment in their shoes?
EDIT: per a comment, here's an example situation...
A typical example would be on the walk to my apartment when in conversation, I'll remember that the friend I'm talking with forgot their shoes last time so I'll interrupt the conversation with:
By the way, just remember to take your shoes off when you come in!
I'll get an "okay" or a "sure," while we're walking, but when we get to my apartment I'll open the door and start to take my shoes off while they come right in and begin setting up the game we're going to play. I would think that the reminder, along with me taking my shoes off myself would be enough, but I think they see it as I'm taking my shoes off since this is my apartment and I want to be comfortable, and they're thinking about the game we're going to play and so forget my warning.