3 Effective Ways to Solve ERR_UNSAFE_PORT Error

err_unsafe_port

Have you ever wondered how frustrating it gets when you encounter any sort of error leading to interruption in your daily tasks, including “ERR_UNSAFE_PORT”?

It is dubitable how far we can get ahead in technology with Internet Service Providers (ISPs) & quickly look for the exact data set that you were looking for, surfing through the internet browsers in our daily lives.

Nevertheless, Toolspond has got you 3 simple yet efficient ways to fix this error for flawless internet browsing on different devices/platforms in 2022!

In this article, I will help you fix the issue. Continue reading this post to get rid of this error.

What is ERR_UNSAFE_PORT?

ERR_UNSAFE_PORT error occurs when the browser tries to connect to an unencrypted website. By preventing users from accessing sensitive information, Browsers like Chrome, Microsoft Edge, Firefox, etc., can protect you from getting into unsafe connections. Your browser is currently preventing you from accessing the unsafe ports. Attackers can exploit this issue to trick the web browser into performing specific actions that are harmful to the user.

Why does ERR_UNSAFE_PORT error occurs?

ERR_UNSAFE_PORT
ERR_UNSAFE_PORT

This error occurs because the wifi network’s settings have not been set up correctly to allow secure connections.

This issue mainly occurs when data is accessed using a non-recommended port.

Enabling Unsafe Connections

You need to explicitly allow access to the unsafe ports to resolve this issue. There are a few steps that you can follow to get started.

3 Ways to Fix ERR_UNSAFE_PORT on Google Chrome (Windows 10)

Method 1: Allowing Ports

Follow the below steps to fix this issue on a browser like Google Chrome.

  1. Navigate to Google Chrome Application’s destination.
  2. Go to its Properties by Right-Clicking on Google Chrome icon.
  3. Now, Under the Shortcut tab and inside the Target, add —explicitly-allowed-ports=xxx
  4. You may add numerous number of Ports to allow by it separating with a comma.
  5. Apply and Select OK.
  6. Relaunch Google Chrome.
"C:\Program Files\Google\Chrome\Application\chrome.exe —explicitly-allowed-ports=6000,6443"
Fixing Port Issue on Chrome
Fixing Port Issue on Chrome

Chrome Blocking 10080 leading to ERR_UNSAFE_PORT

If you use port 10080 for web development, you might have experienced issues since many browsers have added it to their ports blocked list.

Right-click the Chrome icon and select properties to add a flag to the startup parameters.

Set the Port parameters to 10080.

NOTE: If your website is currently hosted on port 10080, likely, Google Chrome will not continue accessing it.

Some developers may use port 10080 instead of port 80 for HTTP traffic. It avoids having root privileges to bind Unix systems.

Advice: If your website is hosted on port 10080, it’s probably worth considering using a different port.

Method 2: Initialising Google Chrome

If the above method doesn’t work for you, do a Google Chrome Reset.

  • Hold and Press Windows Key+R and paste the following command inside it:
%USERPROFILE%\AppData\Local\Google\Chrome\User Data
  • Select OK.
Run Window
  • Look for a folder named Default and select it.
  • Do the Shift+Delete combination and proceed by selecting Yes.
Google Chrome User Data
Google Chrome User Data
  • Now that you’ve successfully deleted the Default folder, Open up the Google Chrome browser.
  • Click on Settings by clicking on the three dots at the top right corner of the chrome window.
Google Chrome Settings
Google Chrome Settings
  • Search for Reset and Clean Up inside the Settings.
Reset and Clean Up
Reset and Clean Up
  • Click on Restore settings to their original defaults.
Reset Settings
Reset Settings
  • Select Reset settings.
  • Now, Relaunch Google Chrome for error-free browsing.

Method 3: Re-install/Update Google Chrome

If none of these methods works for you, try Updating or Re-installing Google Chrome.

How to Fix ERR_UNSAFE_PORT for Mac OS X

With Mac OS X, users installed on their system also face this error.

No need to worry, because there are solutions to every problem in the world!

Here are necessary steps that you need to follow to get rid of this error on your Mac OS X:

  • Open up Google Chrome.
  • Type chrome://flags and ensure that the feature “Enable Network Service” isn’t enabled (Disabled)
  • Save the changes and Quit the application.
  • Now, you need to create a bash file under your users directory and execute the following command inside it:
// nano unsafe-chrome.sh 
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --explicitly-allowed-ports=993,465,110,21,22,3389

// give it permission
chmod +x unsafe-chrome.sh

Done
  • Relaunch Google Chrome and check if the issue still persists.
  • If it does, then do the Google Chrome Reset.

I hope this method resolves the issue for your Mac OS X.

ERR_UNSAFE_PORT When Connecting to Wi-Fi

At times, wifi can also block some of the ports, giving you the ERR_UNSAFE_PORT error that you would want to access.

Cause

  • It can be due to improper connection of your modem.
  • Network & Security problem.
  • VPN/Proxy setups (Private or Hidden Networks).

Solution

  • Reboot Your Modem / Re-establish Your Internet Connection.
  • Run a Network Troubleshoot.
  • Disbale any current Proxy/VPN that you have been using.

Use any of the below browsers if you are getting the error still.

Also, if you are confused between Chroma and Opera GX, you may check out our post: Opera GX Vs. Chrome: The Better Browser In 2022? – Tools Pond

ERR_UNSAFE due to Guest Wifi

If Google Chrome denied logging into the Guest wifi due to ERR_UNSAFE_PORT, it would try to access it using a different port. Only in case, your site is currently hosted on port number 10080. It is considered that ERR_UNSAFE due to guest wifi is only because Google has blocked a bunch of port numbers, including 10800.

(Resolved) ERR_SAFE_PORT for Ubuntu/Linux

If you are using Ubuntu, as long as the script is modified as root, it will install the latest version of Google Chrome on your desktop.

Type the following commands in a mannered way:

ls -la /usr/bin | grep chrome

Next, modify the “google-chrome” file appending the mentioned switch to execute it:

exec -a "$0" "$HERE/chrome" "-explicitly-allowed-ports=6000" "$@"

Quickly modify the “6000” port number with the comma-separated port numbers that you might be needed.

For example: -explicitly-allowed-ports=5000,6000,7000

NOTE: for Ubuntu UNIX, the switch never starts with “–“. It simply does begin with a single “-“

FAQs Related to ERR_UNSAFE_PORT

What ports does Google Chrome consider unsafe and are blocked?

Google Chrome is disabling FTP, HTTP, and HTTPS to access port numbers 69, 137, 161, 554, 1719, 1720, 1723, 5060, 5061, and 6566.

How to fix ERR_UNSAFE_PORT error on android devices?

Advanced Wi-Fi settings >> Configure HTTP/Proxy >> Manually Enter the Port number >> Save the settings.

Why has Google Chrome restricted a few of the ports?

Port restrictions are enforced to prevent Google Chrome from accessing your network as a vector for exploitation. It is a temporary fix that will allow you to migrate a service without exposing your network to attacks.

Conclusion

In this article, I have listed down the best solutions to quickly resolve the issue caused by the ERR_UNSAFE_PORT error on your Windows OS, Mac OS X, Android, and Ubuntu/Linux systems.

If you are still facing this ERR_UNSAFE_PORT and have any queries, you can reach out to us via the comment section below, and we’d be delighted to help you with the same.

If you find this article to help you fix the ERR_UNSAFE_PORT error, then do share it, and you may also Check out our daily blog posts.

Leave a Comment

Your email address will not be published.

Scroll to Top