Muhammad encouraged people to get married and establish a family life. He taught his followers noble Islamic values which ban illegal sexual relations other than a normal marital relationship between a man and a woman.
Non Marital Sex Women Women (Sahih Al-Bukhari, 3/26, 1905)
A young man asked Muhammad to give him permission to fornicate (have non-marital sex with a girlfriend or a prostitute), Muhammad replied: "Do you accept this for your mother?" The man answered: "No." Muhammad said: "Likewise people don’t like it for their mothers.
question three more times: "Do you like it for your daughter, sister, aunt?" Every time the man replied no and Muhammad repeated the same statement: "Likewise, people don’t like it for their daughters, sisters and aunts"
hen Muhammad put his hand on the man’s heart and supplicated to God: “Oh my Lord: forgive his sin, purify his heart and grant him chastity" (Munsad Ahmad, 10/5220, 22641