# Gltf files not loading on web server

**URL:** <https://discourse.threejs.org/t/gltf-files-not-loading-on-web-server/13731>\
**Category:** Questions\
**Tags:** loaders\
**Created:** [March 23, 2020, 9:21am UTC](https://discourse.threejs.org/t/gltf-files-not-loading-on-web-server/13731 "2020-03-23T09:21:45Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![v\_man\_dog\_star](https://avatars.discourse-cdn.com/v4/letter/v/c68b51/32.png) [@v\_man\_dog\_star](https://discourse.threejs.org/u/v_man_dog_star)\
**Post date:** [March 23, 2020, 9:21am UTC](https://discourse.threejs.org/t/gltf-files-not-loading-on-web-server/13731/1 "2020-03-23T09:21:45Z")

</div>

Hi,

I’m having trouble getting gltf files to load on the web…

Everything works fine on a local server, models load and everything behaves as expected. Problems occur when I put the models online - they don’t load and give a 404 error.

Here’s a link to the site to show the problem I’m having:

[https://www.surfacecollider.net/Bubble2/](https://www.surfacecollider.net/Bubble2/)

I’ve tested the models in online model viewers too. All work fine.

Any ideas please?? I’m stuck!

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [March 23, 2020, 9:40am UTC](https://discourse.threejs.org/t/gltf-files-not-loading-on-web-server/13731/2 "2020-03-23T09:40:34Z")

</div>

Well, I can see the 404 on the browser console, yes. Unfortunately, this is something that you have to debug by yourself. Ensure to put your assets in the correct directory of your web server.

BTW: Your website logs the following runtime error:

> Uncaught ReferenceError: $ is not defined

It seems you are using jQuery without including the library.

---

<div class="post-metadata">

**Author:** ![v\_man\_dog\_star](https://avatars.discourse-cdn.com/v4/letter/v/c68b51/32.png) [@v\_man\_dog\_star](https://discourse.threejs.org/u/v_man_dog_star)\
**Post date:** [March 23, 2020, 9:48am UTC](https://discourse.threejs.org/t/gltf-files-not-loading-on-web-server/13731/3 "2020-03-23T09:48:57Z")

</div>

Thanks for such a quick response and advise on the JQuery library… Any suggestions on how to debug, when everything gltf wise works perfectly well locally?

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [March 23, 2020, 9:58am UTC](https://discourse.threejs.org/t/gltf-files-not-loading-on-web-server/13731/4 "2020-03-23T09:58:02Z")

</div>

That depends on the way you are hosting your assets. What kind of backend solution are you using?

---

<div class="post-metadata">

**Author:** ![v\_man\_dog\_star](https://avatars.discourse-cdn.com/v4/letter/v/c68b51/32.png) [@v\_man\_dog\_star](https://discourse.threejs.org/u/v_man_dog_star)\
**Post date:** [March 23, 2020, 10:28am UTC](https://discourse.threejs.org/t/gltf-files-not-loading-on-web-server/13731/5 "2020-03-23T10:28:25Z")

</div>

Backend solutions are something that I don’t know very much about at the moment, so I’m afraid I’m out of my depth here, but…

A quick search through [builtwith.com](http://builtwith.com) led to this:

> **[BuiltWith](https://builtwith.com/)**
>
> Find out what websites are BuiltWith

[Asp.net](http://Asp.net) and Nginx are the framework and servers. Do I have to have anything specific set up in terms of databases (or anything else) for use with gltf files?

---

<div class="post-metadata">

**Author:** ![v\_man\_dog\_star](https://avatars.discourse-cdn.com/v4/letter/v/c68b51/32.png) [@v\_man\_dog\_star](https://discourse.threejs.org/u/v_man_dog_star)\
**Post date:** [March 23, 2020, 10:30am UTC](https://discourse.threejs.org/t/gltf-files-not-loading-on-web-server/13731/6 "2020-03-23T10:30:15Z")

</div>

Sorry, it posted to the site, as opposed to the specific link I entered… Hope the other info makes sense though

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [March 23, 2020, 10:49am UTC](https://discourse.threejs.org/t/gltf-files-not-loading-on-web-server/13731/7 "2020-03-23T10:49:54Z")

</div>

> [@v\_man\_dog\_star](#):
>
> [Asp.net](http://Asp.net) and Nginx are the framework and servers. Do I have to have anything specific set up in terms of databases (or anything else) for use with gltf files?

Sorry, I don’t know that. This could be a mime type related problem but this is just a wild guess. Maybe it’s better to post a question at stackoverflow about this issue.

---

<div class="post-metadata">

**Author:** ![v\_man\_dog\_star](https://avatars.discourse-cdn.com/v4/letter/v/c68b51/32.png) [@v\_man\_dog\_star](https://discourse.threejs.org/u/v_man_dog_star)\
**Post date:** [March 23, 2020, 10:52am UTC](https://discourse.threejs.org/t/gltf-files-not-loading-on-web-server/13731/8 "2020-03-23T10:52:42Z")

</div>

Great, thanks for your help and time. I’ll ask there
