Not able to run index.html file under Public folder

Hi all,

I have a website using hugo-universal-theme. Everything is good. But there is file called index.html under Public folder. i am not able to run it. not Sure why. Could you please help me in this?

below is for your reference


What do you mean by being unable to run it?

The index.html is the generated homepage of your project.

Generally speaking you do not need to fiddle with the generated HTML under the public folder.

If something else is happening, like for example the page is blank in the browser then please read the Requesting Help Guidelines and provide the necessary prerequisites to troubleshoot the issue.

Also please note that screenshots are rarely helpful when describing a problem.

Open a web browser and drag’n’drop this index.html into the browser. You seem to have some local issues with the program that is assigned to handle .html files.

1 Like

Thanks, I tried and it is coming like below (Fiq1). Is this how we get ? :slight_smile:/ But when I build website I get properly. Like a website


well… … …

In public you find your website. If you just drop the index.html into your browser then the file is loaded locally and the styles are added from an URL that is not reachable, because the browser loads the index.html via file:// instead of http(s)://.

If you upload the website you can see it properly because you access the site via http protocol.

Locally you do the following:

  • you read the documentation.
  • you find something about hugo server.


  • you go on the console (command/bash/terminal) to the folder where your repo is located
  • you run hugo server in the console and wait until it tells you, the server is running
  • you open a browser and load http://localhost:1313 (or whatever the message in the step before tells you) and you see your website.

Thanks. I agree if we upload in server I get properly. But what I wanted to check if we can see the same website when I run Public/index.html Not possible right?

run hugo server like I wrote. That’s “running” locally.

Really thanks. Sorry i am finding difficult to run this. can you please share the steps?

Your question is very fundamental and beyond the scope of support offered in this forum.

You need to be familiar with the basics of Hugo before asking for help here.

Have a look at the Quick Start Guide and the rest of the Hugo Docs

Also I already directed you to the Requesting Help topic above. I have yet to see you sharing your Hugo project.

This is getting nowhere.