• March 4, 2024

How to fix ERR_UNSAFE_PORT error in Google Chrome, Firefox?

More and more users are interested in the ERR_UNSAFE_PORT error on various forums and in the comments. Some of these users noted that they tried to work around the problem by connecting through different ports, but the error remained adamant. In fact, the error occurs due to the fact that an unsafe port is being used in the browser. For security reasons, this connection is terminated with the message ERR_UNSAFE_PORT.

What is the cause of the ERR_UNSAFE_PORT error?

The main reason is that the browser itself stops access to ports that it considers unsafe. All web developers understand the importance of internet security. With the tremendous growth in users, the number of attackers has increased. Various hackers are constantly trying to trick the web browser into using insecure ports. To reduce the risk of atrocities, browser makers have begun blocking such connections.

How do I allow the use of unsafe ports in the browser?

Despite blocking dangerous connections by default, the web browser allows you to manually allow them access. The ways to remove protection are different for each browser. In order not to delay the material, 2 popular browsers will be considered: Chrome and Firefox.

Method for Google Chrome

To open ports in Chrome, you need to specify one key in the shortcut. The line below will tell the browser that the user is willing to take the risk and use unsecured ports.

How to setup:

  1. Select the browser shortcut, right-click and click on the “Copy” button.
  2. “Paste” it to an empty space on the desktop, it will have “Copy” in its name, but you can also “Rename”.
  3. Right click on the copy and select “Properties”.
  4. Insert the phrase into the line “Object” –Explicitly-allowed-ports = xxx, where xxx is the port number.

Important! Before the key, but after chrome, there must be a space, and the phrase starts with two dashes, not one long one. The second point – if you need to open access to several ports, they should be listed separated by commas.

Method for Firefox

The method is very different, here you already need to use a special option. Only new versions of the browser do not have it by default. You will also have to add them manually.


  1. Enter about: config in the address bar.
  2. Right-click on the work area and select “New” – “Line”.
  3. Create an option with a name security.ports.banned.override
  4. Specify target ports. 2 types of recording are supported: 1-65535 – for all, 1,2,3 – for a specific port.

The assignment of ports can change, and their basic settings are available on the network at the target request. After adding the port to exceptions, the connection should work. Although no secure connection has been established, the browser ignores this security setting. Given the potential risk of being manipulated by hackers, it is best to use the function with caution. We hope that you were still able to get rid of the ERR_UNSAFE_PORT error.

Earn points and exchange them for valuable prizes – details

Leave a Reply

Your email address will not be published. Required fields are marked *