If you dream of closing a door, it signifies changes in your relationships. For an unmarried man, it suggests the possibility of marrying an honest woman. Conversely, if you are married and see yourself closing a door, it may indicate a potential divorce from your wife. This dream reflects your attitude towards your relationships and your future plans.
From Imam Muhammad Ibn Seerin's Dictionary of Dreams According to Islamic Inner Traditions â entry "Shut" (page 389) â resolved via the equivalent "Close" entry.
If a single man sees himself shutting a door in a dream, it means that he will marry a righteous woman. If a married man sees himself shutting a door in a dream, it means that he may divorce his wife. Locking a door in a dream also means getting married, though unlocking a padlock has negative connotations. Ifone sees his door locked in a dream, it means that he will choose to pursue his worldly satisfaction instead of fulfilling his religious obligations. If one tries to lock the door of his house and fails to do so in his dream, it means that he will abandon a hard decision he took, or refrain from pursuing the impossible in his case.
Note: Islamic dream interpretation depends on the dreamer's circumstances and state. This is a general guide drawn directly from the source book.