"To or Of" (Do you always lock the door TO your apartment)

“To or Of”

“Do you always lock the door TO your apartment”?

While reading a book I came across with this sentence, my native language is Spanish and I would use “of” instead of “to”…

“Do you always lock the door OF your aparment”?

Are they both okay?

If the right answer is “to”, is there a grammar reasoning you could help with for me to understand this sentence and the rule for the usage of “to” in general?

Thanks in advance for all of your help.

God Bless you.
Cisco.

Hi,

I would say either is possible. The idea is that the door to suggests the door that leads to. The door of suggests the door belonging to the apartment.

Alan