Home
Support Forums

I am getting a 404 after the build states Published

My netlify site name is: unruffled-carson-399170
It is a Golang application using Go templates, no index.html exists.
I am getting a 404 after the build states Published
The url is: https://usdemocracy.info/

Build command: go build -o usd - Published —> 404
1:12:47 AM: Netlify Build
11:12:47 AM: ────────────────────────────────────────────────────────────────
11:12:47 AM: ​
11:12:47 AM: ❯ Version
11:12:47 AM: @netlify/build 12.4.0
11:12:47 AM: ​
11:12:47 AM: ❯ Flags
11:12:47 AM: deployId: 60cce20ea46c6800070e9ad5
11:12:47 AM: ​
11:12:47 AM: ❯ Current directory
11:12:47 AM: /opt/build/repo
11:12:47 AM: ​
11:12:47 AM: ❯ Config file
11:12:47 AM: No config file was defined: using default values.
11:12:47 AM: ​
11:12:47 AM: ❯ Context
11:12:47 AM: production
11:12:47 AM: ​
11:12:47 AM: ────────────────────────────────────────────────────────────────
11:12:47 AM: 1. Build command from Netlify app
11:12:47 AM: ────────────────────────────────────────────────────────────────
11:12:47 AM: ​
11:12:47 AM: $ go build -o usd
11:12:49 AM: ​
11:12:49 AM: (build.command completed in 1.9s)
11:12:49 AM: ​
11:12:49 AM: ────────────────────────────────────────────────────────────────
11:12:49 AM: 2. Deploy site
11:12:49 AM: ────────────────────────────────────────────────────────────────
11:12:49 AM: ​
11:12:49 AM: Starting to deploy site from ‘’
11:12:49 AM: Creating deploy tree
11:12:49 AM: Creating deploy upload records
11:12:50 AM: 2 new files to upload
11:12:50 AM: 0 new functions to upload
11:12:50 AM: Site deploy was successfully initiated
11:12:50 AM: ​
11:12:50 AM: (Deploy site completed in 357ms)
11:12:50 AM: ​
11:12:50 AM: ────────────────────────────────────────────────────────────────
11:12:50 AM: Netlify Build Complete
11:12:50 AM: ────────────────────────────────────────────────────────────────
11:12:50 AM: ​
11:12:50 AM: (Netlify Build completed in 2.3s)
11:12:50 AM: Starting post processing
11:12:50 AM: Post processing - HTML
11:12:50 AM: Post processing - header rules
11:12:50 AM: Caching artifacts
11:12:50 AM: Started saving build plugins
11:12:50 AM: Finished saving build plugins
11:12:50 AM: Started saving pip cache
11:12:50 AM: Post processing - redirect rules
11:12:50 AM: Post processing done
11:12:50 AM: Finished saving pip cache
11:12:50 AM: Started saving emacs cask dependencies
11:12:50 AM: Finished saving emacs cask dependencies
11:12:50 AM: Started saving maven dependencies
11:12:50 AM: Finished saving maven dependencies
11:12:50 AM: Started saving boot dependencies
11:12:50 AM: Finished saving boot dependencies
11:12:50 AM: Started saving rust rustup cache
11:12:50 AM: Finished saving rust rustup cache
11:12:50 AM: Site is live :sparkles:
11:12:50 AM: Started saving go dependencies
11:12:51 AM: Finished saving go dependencies
11:12:51 AM: Build script success
11:13:09 AM: Finished processing build request in 37.292897435s

I also tried
Build command: ./usd
$ ./usd
9:48:56 AM: bash: ./usd: Permission denied

$ go build -o usd && ./usd
9:52:36 AM: Server running on localhost:3000
10:46:57 AM: Build exceeded maximum allowed runtime

The site runs both as standalone binary and also in a Docker environment.
$ ./usd
Server running on localhost:3000

@pigfox Welcome to the Netlify community. This statement – and your references to localhost – are confusing:

It sounds as though you are expecting to run a server on Netlify, which is not possible.

This is why you must have an index.html file at the top level of your site – everything is delivered out of cache, not via an interactive server process.

1 Like