Site preview from smart phone in LAN is not possible

I build my site on my laptop and try to preview the layout from mobile phone in LAN.
My laptop and my mobile phone are all connected to the router via wifi

hugo --buildDrafts server


Web Server is available at http://localhost:1313/

My IP address for laptop is

So I try to type in Chrome of my Nexus 5.

However, it does not work:

This site can't be readched refused to connect

I am pretty sure it is the problem of hugo server, since I tried jekyll and other server programs with my smart phone and pad, they all work as normal.
It seems the hugo server refuse the connection other than localhost …

Any ideas ?


hugo server -D --bind

Thank you for the quick reply.
I works, but not css file is loaded and all links are broken, since they start with localhost:1313/...
I think css file problem is also cause by URL.
Is there a workaround ?

hugo server -D --bind --baseURL

try `hugo server -h` for more options.

It works! Thank you.

You got it sorted in the end. But, just in case anyone else is developing for mobile as well:

Both Firefox and Chrome’s Web Developer tools now include mobile device simulators to help with this kind of thing.

In Firefox the button is called ‘Responsive Mode’…

and in Chrome ‘Device Mode’…

Both allow you to test your layout on a range of common mobile device screen sizes, without needing the actual hardware to hand:

Firefox Version:

Chrome version


Thank you for your advice.
It’s nice to know. =)

Wow very cool, was just wondering about this the other day! Thanks for sharing.