i opened the door for a random man while i was home alone and i'm upset about it

I think you're unnecessarily being hard on yourself here. You had to make s decision in a split second. It's easy to think after the fact that we should have done this or that.

I guess in future how you handle it is don't go to the door at all if somebody knocks and you're alone. Friends and family always arrange a visit beforehand. Very few people rock up unannounced because they understand boundaries. So, if something is knocking on the door, and it's unexpected, the chances are that it's a stranger, so just ignore it.

If you are in a situation where you do find yourself at the door, tell them to come back later, and that this is not an appropriate time. Don't say that you're alone.

/r/TwoXChromosomes Thread