All articles
Iz praksemultilingualnext.jsseo

When my own bilingual website turned a Croatian article into a 404

On my own bilingual website, an empty English blog made the Croatian article return a 404 in production, and the fix taught me what a missing translation should do.

The first thing that broke on my own bilingual website was not the English side. It was the Croatian article, which returned a 404 in production because the English blog was empty. I had decided that an empty language should simply have no pages. The framework decided that an empty language should take the other one down with it.

The situation: two languages, one rule

webica.hr exists in Croatian, at the root, and in English, under /en. In September 2026 I decided that the English blog does not translate the Croatian one. It carries original articles for buyers in the UK, Belgium, the Netherlands and the Nordic countries, so the two blogs overlap very little. On 5 November 2026 the Croatian blog holds eight articles and the English one seven, and the two lists share no slug.

Croatia joined the EU in 2013 and has used the euro since 2023, so I work to EU law and in euros for every client, and only the language of the website differs. That led to a rule I still hold: there is no fallback to the default language. If an article has no English version, it does not exist in English. I would rather show a 404 than Croatian text under an English address, because a visitor who lands there has been misled about what the page is.

The same rule governs search signals. The site emits hreflang annotations only when both language versions of a page exist, and x-default points at the Croatian one. A hreflang pointing at a page that is missing or untranslated is worse than none, because it tells a search engine something false about the pair.

The rule comes down to four decisions, and each one has to agree with the others.

QuestionWhat the site does
A page exists in one language onlyThe other language returns a 404
The sitemapLists a page only in the languages where it exists
hreflangEmitted only when both versions exist
x-defaultPoints at the Croatian version

What I expected: an empty language means no pages

I built the English blog first as an empty folder, on purpose, until the first original article was ready. My mental model was simple. Each language supplies a list of article slugs, the build prerenders a page for every slug, and an empty English list means no English pages and nothing else.

That model is right for one language at a time. It is wrong for the route as a whole, and I had only tested it with content in both folders.

What actually happened: the Croatian article became a 404

After launch, the Croatian article returned a 404 on production. In development it worked. In the build, the dynamic route under the language segment ended up with zero prerendered paths instead of one.

As far as I could tell, the results from generateStaticParams for each language are combined as all or nothing. When one language returns an empty list, the route is left with no prerendered paths, and the other language goes with it. I did not see it earlier because the case studies hid it: both languages returned the same 26 entries, so their lists never differed. Twenty-six equal entries in each language were enough to hide a bug that needed just one empty list to appear.

What I got wrong

I tested the site with the content I had, not with the situation I had chosen. The empty English blog was a deliberate state, and I never ran the build in that state before shipping it. A bug that only exists when one language is empty cannot show itself on a site where both are full.

The fix was small. The dynamic routes now return the union of slugs across both languages, and the page itself calls notFound() for a combination that does not exist. The sitemap and the hreflang pairs come from a separate list of the languages in which each article really exists. So /en/blog/<a-croatian-slug> is still a 404 and appears nowhere, which is what the rule asked for all along.

The rule is now written into the project notes: dynamic routes under the language segment return the union, never a list per language.

The 404 page was wrong too

While fixing that, I found the second problem. The global 404 page printed both languages, one under the other. It was defensible, since the page cannot know who arrived, but it looked like a mistake.

It now picks one language from the path prefix. It is still not right. The page is prerendered without a path, so the server sends the Croatian version and the browser swaps in English after hydration. The page is noindex and gets almost no traffic, so I accepted that. Fixing it properly would mean routing every /en/* miss into the language tree, which means either a catch-all route that answers 200, a soft 404 that search engines dislike, or a separate layout per language. I did not think that was worth it for this page.

What I would do differently

I would test the empty case first. If the plan says a language may be empty, partly translated or missing a section, the first build I run is that one, not the complete one.

I would also write the fallback rule down before writing any code: what a missing page returns, what the sitemap lists, what hreflang says and what the 404 says in each language. I made those decisions, but I made them one at a time over several weeks, and one of them collided with the framework.

I still do not know whether no fallback is the right rule for every site. It suits a site where translation is a decision about each page. I have not tried it where most pages are untranslated and a visitor reasonably expects a default.

If you are commissioning a bilingual website

Ask four questions, and ask them about production, not a demo. What happens to a page with no translation? Which pairs does the site declare with hreflang, and do both ends exist? What does the 404 say in each language? And what does the build do when one language has nothing yet?

The same rule runs through Lea Gobo's website, which exists in Croatian and English: whatever is not translated does not appear in that language. How I scope and build a bilingual site is on the websites service page.

About the author

Jurica Stublić

Jurica Stublić

Web designer and developer · 4 years · 50+ projects

I build custom web and mobile apps, web shops and websites, and I stay on the project after launch. Alongside client work I develop my own product: ai.webica.hr.

Read next

A slot is open right now, get in touch about working together

If you have an idea worth doing properly, the first step is a 30 minute conversation.

No proposal and no pressure. You tell me what you're building, I ask the questions nobody has asked you yet, and by the end you know whether it's feasible, roughly what it costs and what the next step is. Whether or not we end up working together.

Jurica Stublić u radu na projektu