How to Disable Incognito Mode in Windows, Ubuntu and macOS.
When you have kids, it’s always dangerous to have incognito mode in your browser. Or you switch to parental controls, but not all browsers and operating systems support parental controls. Hence, your only option is to block Incognito Mode completely. So here’s how to turn off Incognito Mode on Windows, Ubuntu, macOS, and Android.
The way to disable incognito mode is more OS-dependent than browser-dependent. We would start with Windows, and just in case you are using Ubuntu, go to this part and for macOS go to this part All of these methods require root or administrator rights.
Also read:Â How to Put Parental Controls on YouTube App
How to disable the incognito mode
1. Windows
For Windows, we are considering 2 popular browsers: Mozilla Firefox and Google Chrome. On Windows, the easiest way to turn off Incognito Mode is through the Windows Command Prompt. To do this, run Command Prompt with administrator rights.
To disable incognito mode in Chrome browser, type the following command in cmd and press Enter. REG ADD HKLM SOFTWARE Policies Google Chrome / v IncognitoModeAvailability / t REG_DWORD / d 1
For Mozilla Firefox, use the following command instead. REG ADD HKLM SOFTWARE Policies Mozilla Firefox / v DisablePrivateBrowsing / t REG_DWORD / d 1
Restart your browser and the next time you start Incognito Mode will be disabled for you. To re-enable Incognito Mode, use the following command for Google Chrome and Mozilla Firefox respectively.
Google Chrome: REG DELETE HKLM SOFTWARE Policies Google Chrome / v IncognitoModeAvailability / f
Mozilla Firefox: REMOVE HKLM SOFTWARE Policies Mozilla Firefox / v DisablePrivateBrowsing / f
2. Ubuntu
For Ubuntu, we are looking at the 2 most popular browsers: Mozilla Firefox and Google Chrome. The fastest way to disable private / incognito mode in Ubuntu is through Terminal. Let’s start with Google Chrome.
Google Chrome:
Open a terminal and navigate to the following “/ etc / opt /” folder using the command below. cd / etc / opt /
Here we need to create several directories, so use the following command to create and navigate to the newly created directory. sudo mkdir -p chrome / policy / managed && cd / etc / chrome / policy / managed
For Chromium, a directory is created “/ etc / chromium / policy / managed”
Read: Simple Trick to Bypass Google reCaptcha in Chrome in Incognito Mode
Next, we need to create a JSON policy file and add some lines to turn off incognito mode. To do this, use the following command. vi chrome_policy.json
Now in vi editor enter the following lines. {“IncognitoModeAvailability”: 1}
Then press “:” and then “wq” to save the changes to the file.
Start Google Chrome now and Incognito Mode will be disabled. To enable it again, change the text in the JSON file as follows. {“IncognitoModeAvailability”: 0}
Mozilla Firefox:
The method for disabling private mode in Mozilla Firefox is similar to the one mentioned above with some changes to the text and directory location. First go to “/ usr / lib / firefox / distribution†with the following command. cd / usr / lib / firefox / distribution
At this point, we need to create a JSON file and add some lines to it. To do this, run the following command. sudo vi policy.json
Now add the following lines of code to the file.
The file name must be exactly policy.json. {"policy": {"DisablePrivateBrowsing": true}}
After entering the lines, press “:” and wq to save and exit the JSON file.
Restart Firefox and you can still see the private window option. However, if you try to run private mode, you will see the following error.
From now on, everything that you search in this window will be recorded in the browser history. To enable private browsing again, remove the lines of code we added above from the policy.json file.
3. macOS
For macOS, turning off Incognito Mode is pretty easy if you’re dealing with Google Chrome, but rather difficult with the native Safari app. First, let’s take a look at how to do this in Google Chrome.
Google Chrome:
To disable incognito mode, we need to run a command, and for this we need a terminal. To launch Terminal, press command + Spacebar to launch Spotlight search. Enter “ Terminal ” in the search bar, and then double-click the first search result.
In Terminal, enter the following command. This command will change the system policy and disable incognito mode. by default we write com.google.chrome IncognitoModeAvailability -integer 1
Now restart Google Chrome and publish that you will see the option to launch incognito mode is invisible.
Safari:
Now, to turn off Private Browsing for Safari, the only way is to change the Safari interface to include editing the “nib” file. To do this, we will need to download Xcode and the nib file editor from GitHub. This change is irreversible unless you back up the “MainMenu.nib” file.
Chances are high that you can hack the Safari code and therefore I would not recommend going down this line. The best you can do is turn on parental controls in Safari, which inherently blocks adult websites.
4. Android
On Android, you will need the paid Incoquito tool ($ 1) to block incognito mode on Google Chrome or any Chromium-based browsers. We have a dedicated article on how to turn off Incognito Mode in Google Chrome for Android, you can read it for a detailed guide on this topic.
Closing words
These methods are best for blocking incognito on a local network or on your computer. To learn more about website blocking and DNS, check out our articles on how to block a website or how to switch to a public DNS server.
For any questions or concerns, let me know in the comments below and I’ll get back to you.
Also Read:Â How to Enable Cookies on iPhone
How to Disable Incognito Mode in Windows, Ubuntu and macOS