By default DNS is not announced in the DHCP offer message, because a DNS server does not ship with NodeMCU. In order to announce that the ESP8266 is running a DNS server, NodeMCU has to be recompiled to support that. A guide to building NodeMCU can be found here.
Thanks to the wonderful work of Andy Reischles on Captive Portal, a lua implementation of a domain hijacking DNS server exists. Which will allow an ESP8266 to redirect all traffic to itself.
Detailed guide
In dhcpserver.h, #define USE_DNS 1
Build NodeMCU.
Flash NodeMCU.
Upload all .lua files and index.html.
Reboot ESP.
As far as I can tell this is not going to be possible with frightanic's custom builds. Yet when I simply went ahead with the captive portal example anyway, it did seem to work although rather clunkily...
On connecting to the ESP8266 Acces Point "Sign in to W-Fi network" appears in the phone's notification bar but selecting this I get a browser with "clinets3.google.com/generate_204" in the address bar and after a few tens of seconds of not loading anything, the page times out with an error. But then the AP seems to reconnect and the page eventually loads.
So I'm wondering if it's working the way it should and if so how does it work without tweaking the USE_DNS 1 define?