As a long time user of Ubuntu (10y+) I have noticed the relationship between Ubuntu and public Wifi hotspots (without wifi security) that require login through a web page have not always been easy...

At times, I was able to be automatically redirected to a web page for logging in, but I have been experiencing the same problem for a while: after connecting to the open wifi network, the browser does not redirect to the login page! I have just updated to 16.04 and I was disappointed to see it did not fix the problem.

I tried deleting the connection from Network Manager but this doesn't change anything. The behaviour is the same with any browser (Chromium, Firefox, Opera, etc). I have dual-boot on this machine and no problem connecting to those network in Windows...I don't really know what else to try...

Is anyone else experiencing this issue? Any help to troubleshoot (or solve) the problem is highly appreciated. Please let me know if you need command outputs for diagnostics.

Update: Today, I did manage to connect to one of these wifi networks, but received a warning first :

enter image description here

However, I tried to connect to a Starbucks network afterwards and still have the same problem. Thaller below pointed to a possible problem in the NetworkManager.conf file: could anyone maybe post a normal file so I can see what's wrong with mine?

  • Sounds like a browser problem and not an Ubuntu problem. Have you tried other browsers, say Chrome(ium) for example? – You'reAGitForNotUsingGit Sep 19 '16 at 15:38
  • Just edited my post:the issue is present with any browser – R Pennese Sep 19 '16 at 15:55
  • Does it work with those browsers in Windows? Or it just opens in IE? – user589808 Sep 19 '16 at 17:15
  • @CelticWarrior, yes the Windows versions of those browsers allow to be redirected and log in. – R Pennese Sep 20 '16 at 7:36
  • Check the answer below. Also some captive portals use things like ActiveX which is Microsoft proprietary for Windows. If that's the case the login page may not load properly or not at all. – user589808 Sep 20 '16 at 16:03

Here is what I have found works for forcing the captive portal (i.e., login page for WIFI connections on public hotspots):

  1. Make the connection to the WIFI.

  2. Open a terminal and type route. You should receive a display such as:

    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface    
    default         UG    600    0        0 wlo1        *        U     600    0        0 wlo1    
    link-local      *          U     1000   0        0 wlo1```
  3. Type the default Gateway (i.e., into your browser's address bar, you will receive the WIFI login page.

  • This is useful info. Ubuntu tried to connect to nmcheck.gnome.org for me for some reason. – qwr Jun 1 '18 at 21:01
  • 3
    What about a solution using only core utilities? I don't have route, and of course can't install it because I don't have internet on that device. – grisaitis Aug 15 '18 at 18:17
  • 3
    One small suggestion... I had to pass the -n option with my route command (i.e. route -n) to get the necessary ip. Without it, the Default Gateway was shown as a domain name that couldn't be resolved. The -n option forces route to display the results as numeric ip addresses. – notorious.dds Oct 20 '18 at 14:01
  • 4
    @grisaitis - core utilities has ip, which has option route. Usage: ip route – AaronDanielson May 29 '19 at 15:57

I have the same problem and I am going to add the following to my /etc/NetworkManager/NetworkManager.conf file:



  • 1
    Is this an answer to the question? – George Udosen Mar 2 '17 at 13:25
  • This did it for me! – Tested at Starbucks, with Ubuntu-Gnome 16.04 – theV0ID Mar 27 '18 at 17:25
  • Did not work for me (on Antergos-Gnome). – Johan Larsson Jun 19 '18 at 17:29
  • Remember to restart the network manager with service network-manager restart after. – parsley72 Jan 6 '20 at 19:57

For me,

sudo dpkg-reconfigure resolvconf

completely solved the problem. I hope it will help you.

  • 7
    Could you please edit and expand your answer a bit, e.g. by describing what the command does ans why this might solve the problem in the question? Thanks and welcome to Ask Ubuntu. – Byte Commander Jan 6 '17 at 15:25
  • This worked for me too. Resolv.conf seems to be a configuration which tells your browser/network connect where to look first for domain name resolvers (DNS). These captive portals redirect your requests for "somesite.com" to -> [captive login page]. – emf Mar 10 '17 at 19:06

Guruprasad L's blog post's answer for me.

  1. Create file /etc/NetworkManager/conf.d/20-connectivity-debian.conf (you'll need root or sudo).
  2. Add the following lines as recommended by Guruprasad:

    response=NetworkManager is online
  3. Restart the network manager with service network-manager restart (will need sudo or root again).


Enter http://nmcheck.gnome.org in your browser. (I added the "hotspot login" of Ubuntu 18 to my favorites and it showed that address, every time I clicked on it.) It worked for me.

  • This is an underrated answer. Works perfectly for me and is extremely simple - I just added it to my bookmarks toolbar, so now resolving this is just a click away. – Staring Frog Nov 15 '19 at 3:22
  • I was able to get to this while experiencing issues, but it didn't help my connectivity for https pages or prompt the login portal. – eebbesen Feb 11 '20 at 15:53
  • Similar to this answer, icanhazip.com worked great – Timo Huovinen Aug 3 '20 at 20:10

NetworkManager is a bit involved in this. When you configure connectivity-checking (see man NetworkManager.conf), then it will try periodically to download a website to see whether it has internet access. This is also used to detect a captive portal. Based on this, NetworkManager has a Connectivity state, which might be one of Local, Portal, Full.

Appart from that, NetworkManager does nothing. When using gnome3, gnome-shell looks at that connectivity state and might open a portal-login page, that is a browser with some website. Maybe there are other components that perform a similar task like NetworManager's connectivity check or gnome-shell's portal-login.

In the end, you can also do without these two. When you are behind a captive portal you can open a browse to a HTTP site (not HTTPS), the portal will redirect you to a login page.

Maybe you are not redirected because you are trying to open a HTTPS site. The portal usually blocks that entirely, because attempting to redirect it would anyway result in a certificate warning.

  • Thanks, thaller. I realized my NetworkManager.conf is only 5 lines long and I suspect this is not normal...I've probably been dragging it through all these release upgrades and the file remained the same. Is there a way to re-generate this file to the default version? – R Pennese Sep 20 '16 at 16:06
  • There is no certificate warning: the browser doesn't react on its own and if type something in the address bar, it keeps thinking forever... – R Pennese Sep 20 '16 at 16:09

For future answers searchers, I had the exact same problem suddenly in Chromium for Ubuntu 16.04, but trying to navigate to a site in Firefox showed me the login page for the network.


This will likely be of no help to anyone, but I got xfinitywifi working on my Windows partition, then fiddled around with the MAC address until it suddenly started working. I can't replicate it currently.

Not the answer you're looking for? Browse other questions tagged or ask your own question.