# \[SOLVED\] Problem on shared hosting

**URL:** <https://discourse.gohugo.io/t/solved-problem-on-shared-hosting/13781>\
**Category:** support\
**Created:** [August 22, 2018, 10:15pm UTC](https://discourse.gohugo.io/t/solved-problem-on-shared-hosting/13781 "2018-08-22T22:15:34Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![nicks](https://avatars.discourse-cdn.com/v4/letter/n/4af34b/32.png) [@nicks](https://discourse.gohugo.io/u/nicks)\
**Post date:** [August 22, 2018, 10:15pm UTC](https://discourse.gohugo.io/t/solved-problem-on-shared-hosting/13781/1 "2018-08-22T22:15:34Z")

</div>

Hello to everyone, I’ve a question for you: today I wanted to run a test by uploading my hugo website on a shared hosting. I moved the public folder into the server, but when I load the site I cannot see the website well rendered ( I can see only the text) as when I run the hugo server locally.  
To be sure that is not a problem of the shared hosting I also tried to run the website locally by using xampp and loading the public hugo folder but I had the same results.  
what am I doing wrong?  
Thanks for the help

---

<div class="post-metadata">

**Author:** ![RickCogley](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/rickcogley/32/10269_2.png) [@RickCogley](https://discourse.gohugo.io/u/RickCogley)\
**Post date:** [August 22, 2018, 10:23pm UTC](https://discourse.gohugo.io/t/solved-problem-on-shared-hosting/13781/2 "2018-08-22T22:23:48Z")

</div>

Without detail it’s hard to say but, the root of public is also the root of the site?

---

<div class="post-metadata">

**Author:** ![nicks](https://avatars.discourse-cdn.com/v4/letter/n/4af34b/32.png) [@nicks](https://discourse.gohugo.io/u/nicks)\
**Post date:** [August 22, 2018, 10:31pm UTC](https://discourse.gohugo.io/t/solved-problem-on-shared-hosting/13781/3 "2018-08-22T22:31:04Z")

</div>

Yes. I’m not an expert but I test in the past cms like wordpress and joomla working locally with xampp.  
I put the public folder in the xampp/htdocs folder, run the apache webserver and from a browser look for localhost/public. I can see only the post without any trace of the template layout or images.

---

<div class="post-metadata">

**Author:** ![RickCogley](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/rickcogley/32/10269_2.png) [@RickCogley](https://discourse.gohugo.io/u/RickCogley)\
**Post date:** [August 22, 2018, 10:44pm UTC](https://discourse.gohugo.io/t/solved-problem-on-shared-hosting/13781/4 "2018-08-22T22:44:06Z")

</div>

I would say the paths are wrong. Try putting the content of public, in your site folder.

So if you have `public/index.html` that file will be `http://mysite.com/index.html`.

---

<div class="post-metadata">

**Author:** ![benmarte](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/benmarte/32/5948_2.png) [@benmarte](https://discourse.gohugo.io/u/benmarte)\
**Post date:** [August 22, 2018, 10:54pm UTC](https://discourse.gohugo.io/t/solved-problem-on-shared-hosting/13781/5 "2018-08-22T22:54:32Z")

</div>

Did you specify a baseURL?

---

<div class="post-metadata">

**Author:** ![RickCogley](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/rickcogley/32/10269_2.png) [@RickCogley](https://discourse.gohugo.io/u/RickCogley)\
**Post date:** [August 22, 2018, 11:24pm UTC](https://discourse.gohugo.io/t/solved-problem-on-shared-hosting/13781/6 "2018-08-22T23:24:09Z")

</div>

If you’d like a more precise answer, we need some more info to be able to help you, so please have a look at [Requesting Help](https://discourse.gohugo.io/t/requesting-help/9132) and provide some more details like your site repo? Thanks.

---

<div class="post-metadata">

**Author:** ![nicks](https://avatars.discourse-cdn.com/v4/letter/n/4af34b/32.png) [@nicks](https://discourse.gohugo.io/u/nicks)\
**Post date:** [August 22, 2018, 11:49pm UTC](https://discourse.gohugo.io/t/solved-problem-on-shared-hosting/13781/7 "2018-08-22T23:49:28Z")

</div>

I specify the baseurl, I put all the content of the public folder in the htdocs folder of server ( or locally with xampp) and no way to see any graphic. The browser load the index.html because I can see the homepage but only with the text. For this reason I tought it was not a problem of path.  
I’m sorry but I’m building the site locally, no repo.

---

<div class="post-metadata">

**Author:** ![nicks](https://avatars.discourse-cdn.com/v4/letter/n/4af34b/32.png) [@nicks](https://discourse.gohugo.io/u/nicks)\
**Post date:** [August 23, 2018, 12:14am UTC](https://discourse.gohugo.io/t/solved-problem-on-shared-hosting/13781/8 "2018-08-23T00:14:31Z")

</div>

Ok, I solved. In the shared hosting you have to put your file directly in the htdocs of the server without any folder. Thanks for the help

---

<div class="post-metadata">

**Author:** ![RickCogley](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/rickcogley/32/10269_2.png) [@RickCogley](https://discourse.gohugo.io/u/RickCogley)\
**Post date:** [August 23, 2018, 2:55am UTC](https://discourse.gohugo.io/t/solved-problem-on-shared-hosting/13781/9 "2018-08-23T02:55:02Z")

</div>

You _can_ put a folder (public, or whatever you want) but, you need to set baseurl to include it. You can either set baseurl in the config file, or, at the command line when you build. That way, you could publish to multiple locations for example.

---

<div class="post-metadata">

**Author:** ![Kumar](https://avatars.discourse-cdn.com/v4/letter/k/9f8e36/32.png) [@Kumar](https://discourse.gohugo.io/u/Kumar)\
**Post date:** [May 13, 2019, 1:53pm UTC](https://discourse.gohugo.io/t/solved-problem-on-shared-hosting/13781/10 "2019-05-13T13:53:57Z")

</div>

I am facing the same issue. I have create a discussion here.

> [@Change output folder path in public folder](https://discourse.gohugo.io/t/change-output-folder-path-in-public-folder/18636/5):
>
> I have uploaded my Hugo here. [https://drive.google.com/open?id=1WYtK2Knz-jJiMSUkwqO0kOATQQ4Jpi5d](https://drive.google.com/open?id=1WYtK2Knz-jJiMSUkwqO0kOATQQ4Jpi5d) When i make hugo build my output folder is created at public/output. what i am expecting the output is public/public/output. Actual Problem Reason why i need this output folder inside public is. Initially when i make hugo build my public folder is created and the directory structure is Public api-reference categories css dist documentation fonts getting-started images img output sha…

I have mentioned my base url as

_baseURL = “[http://localhost:80/public/](http://localhost:80/public/)”_
