HACKER Q&A
📣 gajus

Google Search Console Tools says my website produces “soft 404”


Here is an example:

https://contra.com/p/gkOQlbLq-validating-postgre-sql-results-and-inferring-query-static-types

Attempting to index this page using Google Search Console Tools gives an error saying that "Availability: Soft 404"

I have done a ton of tests and I don't see anything wrong with this page.


  👤 gregjor Accepted Answer ✓
Google explains it here:

https://developers.google.com/search/docs/advanced/crawling/...

This article has more details:

https://www.searchenginejournal.com/technical-seo/404-vs-sof...

It looks like the page on your site loads the content dynamically. I’m seeing a loading animation. Since it appears the content is just static HTML try delivering it that way.


👤 politelemon
I think it can happen if the page is very light on the HTML aspect and doing too much in the JS, so the page 'appears' empty to the crawler.

Their crawler is perfectly fine with SPAs, and I've indexed SPAs before. But when I visited your URL it seems to be doing too much before gets to the actual content.

Notably I see an initial batch of JS loads, a pause, and then another batch of JS loads before the actual content finally appears - there must be some threshold that the crawler is hitting to make it say that's a soft 404.

When visiting your page, I see almost 400 requests over 8MB, can that be reduced, can you load your content quickly instead of this initial setup you're doing?


👤 gajus
Turns out that the reason was 200+ JavaScript requests.

This is problematic given that this is how ESM is supposed to work.

We ended up bundling _all_ JavaScript to a single bundle and now Google indexes it with no problem.