Failed to download file Build - WEB GL won't load in web browser

Hello there, I was wondering if somebody would be able to help me.

So I am trying to publish my game - Web GL to a web browser and I have run into some difficulties. I have found a few posts and answers online but none quite cut are exact to what I am trying to achieve. I have made a rough and ready - show and tell micro graphic adventure game. When I ‘build and run’ it works.

But when I publish the game outside of unity - I get this error:

***> "Failed to download file

Build/Test-GL2.data.gz. Loading web
pages via a file:// URL without a web
server is not supported by this
browser. Please use a local
development web server to host Unity
content, or use the Unity Build and
Run option."***

Now, I don’t want to run this on my computer as local server - no way. ( if that is the only issue ) But I have a domain hosting platform I can use.

Also, how to i make this Web GL / HTML5 so I can potentially add it to a platform such as ITCH.IO. Anybody with past knowledge feel free to chuck your 2 pence in.

p.s if it is helpful I have published some micro games around 5 years ago and used on my website… but how do I package this more effectively? Thank you for your help!

202758-screenshot-2022-12-09-at-101228.png

202759-screenshot-2022-12-09-at-101336.png

After doing some extensive digging, I may have found the issues - and resolved them with some extensive help and hints.

1 ) I uploaded the project with no compression on. 2 ) I uploaded this to my 3rd party server 3 ) I worked with the server company to ask what was going on and what I needed to calibrate. For the long and short, my server was running.Apache. I created a new htaccess. I added this to the (build) folder with the project )

Now it appears to be working.

#The following lines are required for builds without decompression fallback, compressed with gzip
RemoveType .gz
AddEncoding gzip .gz
AddType application/octet-stream .data.gz
AddType application/wasm .wasm.gz
AddType application/javascript .js.gz

AddType application/octet-stream .symbols.json.gz

Above is the snipped i used.