Quick answer
To quit porn as a Muslim, you do not need to throw your phone away. Block adult content on the phone you keep, close the back doors (extra browsers, X, Reddit and short-video apps), schedule blocks for the hours you slip, like bedtime until Fajr, and let someone you trust set the code that protects it all, so you cannot undo it in a weak moment. Sunnah Lock does each of these steps on iPhone and Android.
I make Sunnah Lock, and it comes up below. This is a practical guide, not a fatwa. For a ruling on your own situation, ask a scholar you trust.
Do you have to get rid of your smartphone to quit porn?
No. Spend an evening in Muslim recovery communities on Reddit and the same advice comes up again and again: get rid of the smartphone and buy an old brick phone.
And the same reply comes back just as often. I need my phone for college. What do I tell my family? How do I watch Islamic lectures on a flip phone?
They are right to push back. An all-or-nothing plan collapses the first time you have a real reason to use a smartphone. The better plan is boring: keep the phone, and take away its ability to show you the thing you are trying to quit.
What does Islam say about watching porn?
The Qur'an asks believers to guard their gaze. In Abdel Haleem's translation: "[Prophet], tell believing men to lower their glances and guard their private parts: that is purer for them. God is well aware of everything they do." (Surah an-Nur, 24:30). The next verse tells believing women to lower their glances too.
Most Muslims who search for help already know where they stand. The problem is the gap between knowing and doing, at midnight, alone, with a phone in your hand. The rest of this guide is about closing that gap.
Step 1: When and where do your slips happen?
Before you change anything, notice the pattern. For most people it is the same few conditions every time: late at night in bed, at home alone, bored, stressed, or after a scroll through short videos that slid somewhere it should not have.
Your pattern picks your tactics. Match each trigger to the block that shuts it:
| If you slip... | Use this |
|---|---|
| Late at night, in bed | A scheduled block on browsers and social apps from bedtime until Fajr. |
| At home, alone in your room | Browsers, X and Reddit blocked for the hours you are usually home alone. |
| After a scroll through short videos | Instagram, YouTube or TikTok blocked as whole apps, plus their websites. |
| When you go looking for it | Adult content blocked, plus any websites you add to your own list. |
| By switching the blocker off | Someone you trust holds the code (Step 4). |
Step 2: Block adult content on the phone you keep
Willpower is a terrible filter. A real filter does not get tired at 1am.
Sunnah Lock blocks adult content, and you can add any other website to your own block list. Search for help with porn addiction and you will find plenty of advice about willpower. Start with the filter instead, then use willpower for the things a filter cannot do.
Step 3: Close the back doors
Most people who "get past" a filter do not hack anything. They walk through a door they left open.
- Extra browsers. A second or third browser is the most common way around a block. Block every browser you do not need.
- X and Reddit. Both allow adult content, and one search on either can take you there. Block the app and the website together. Our guides show how for X and Reddit.
- Short-video apps. Short videos slide from harmless to something else fast. If that is where it starts for you, block Instagram, YouTube or TikTok as a whole, app and website.
Step 4: How do you make a block you cannot undo?
Give the key to someone else. A block you can switch off is a speed bump, and you will switch it off in exactly the moment you most need it on.
Let them set the code that protects your Sunnah Lock blocks. Without that code, blocks cannot be removed or switched off and the app cannot be deleted, so a weak moment has nowhere to go. You never see the code, and you never need to.
Pick someone who will actually keep the code from you: a spouse, a parent, an older sibling, a close friend. Ask them for one more thing: if you ever ask for the code, make you wait a day. Most urges are gone long before then.
You do not have to explain the details. "I am breaking a phone habit, please set this and don't tell me the code" is enough.
Step 5: Lock the hours where you slip
Once the code is out of your hands, aim the strongest blocks at your Step 1 pattern.
- Night. A scheduled block from, say, 11:00 PM until Fajr on browsers and social apps. Charge the phone across the room as well.
- Home alone. If your slips happen at home, keep every browser, X and Reddit blocked for the hours you are usually there alone. You keep messages, maps and lectures, and the risky doors stay shut.
- Long lonely evenings. Block the apps that start the slide for the whole evening, not just late at night.
Step 6: Fill the time you free up
Removing the habit leaves a hole. If you leave it empty, boredom fills it for you. Pick one thing for the evening hours you used to lose: the gym, a sport, a class at the masjid, time with friends.
Prayer belongs in that list too. Allah says "keep up the prayer: prayer restrains outrageous and unacceptable behaviour. Remembering God is greater" (Surah al-Ankabut, 29:45, Abdel Haleem's translation). If your salah has slipped, our guide to staying consistent with salah pairs well with this one.
Step 7: What should you do after a slip?
Do not spiral into "I've ruined everything, so what's the point." Allah says "My servants who have harmed yourselves by your own excess, do not despair of God's mercy. God forgives all sins: He is truly the Most Forgiving, the Most Merciful." (Surah az-Zumar, 39:53, Abdel Haleem's translation).
Repent sincerely, then treat the slip as information. Which door was open? A browser you forgot, a night you kept the phone in bed, a Reddit search. Add that one block tonight, and have your trusted person confirm it.
When should you get more help?
If it is hurting your marriage, your studies or your work, or you feel you cannot stop at all, talk to someone. An imam you trust can help with the spiritual side, and a licensed counsellor, ideally one who understands faith, can help with the habit itself.
What does a full setup look like?
- Install Sunnah Lock and turn on adult-content blocking.
- Block every browser you do not need, plus X and Reddit, app and website.
- Block the short-video apps if that is where it starts.
- Schedule a block from bedtime until Fajr, and one for the hours you are home alone.
- Hand the phone to someone you trust and let them set the code.
Your laptop is the problem: Sunnah Lock for Windows is coming soon. Join the waitlist to hear when it launches.
Frequently asked questions
Can I quit porn without getting rid of my smartphone?
Yes. Keep the phone and remove its ability to show you explicit content: adult content blocked, the extra browsers and risky apps blocked, and the code held by someone you trust.
How do I make a porn blocker I can't turn off?
Let someone you trust set the code that protects your blocks. Without it, blocks cannot be removed or switched off and the app cannot be deleted, so you cannot undo it in a weak moment.
Can I block X and Reddit only at certain times?
Yes. Schedule a block on X, Reddit and your browsers for the hours you usually slip, such as late at night or the evenings you are home alone, and keep them the rest of the day.
Can Sunnah Lock block porn?
Yes. Sunnah Lock blocks adult content, plus any websites you add to your own list, and it can block extra browsers and apps like X and Reddit that lead there.
Does Sunnah Lock work on iPhone and Android?
Yes. Sunnah Lock works on iPhone and Android, and every step in this guide works the same way on both.
Is Sunnah Lock free?
Sunnah Lock is free to download on iPhone and Android. Some features need a paid plan.
What should I do after a relapse?
Repent, do not despair of Allah's mercy, and find the one door that was open. Block it the same day. Fewer slips, further apart, is real progress.
The bottom line
You do not beat this with a flip phone and a promise. You beat it by making the thing hard to reach, giving the key to someone else, and getting back up quickly when you fall.
Sunnah Lock works on iPhone and Android. It is free to download on Google Play and the App Store, and some features need a paid plan. Setup takes about five minutes.
Related reading: best app blocker for Muslims in 2026 and doomscrolling and ghaflah.
Make it hard to reach
Adult content blocked, extra browsers, X and Reddit shut, a block from bedtime until Fajr, and a code someone else holds. Works on iPhone and Android, free to download.