When I added translations to my little video downloader, I thought the hard part was the translating. It wasn't. The hard part was stopping Google from showing the wrong language to the wrong visitor.
The site — ramrom.io — has a tiny JavaScript dictionary that swaps button labels and helper text into nine languages. No framework, no routing, no separate pages per language: one page, one HTML file, and a language selector in the corner. That simplicity is the whole appeal of the setup, and it is also exactly what confused Google.
Here is the problem. The page is English by default, but a Spanish speaker would switch to Spanish, and a French speaker to French. Google, crawling the same single URL, saw the English version and indexed it as English. Sometimes it caught a different language state and indexed that instead. The result was the same page competing with itself in several languages.
The fix is a small tag I had been putting off: hreflang.
What hreflang actually does
A hreflang tag tells a search engine which language a page is written in, and which other language versions of that page exist. It does not translate anything — it is a signpost. Once Google understands that the English, Spanish and French versions are the same page in different languages, it stops treating them as duplicates and shows each visitor the version that matches their language.
That is the entire idea. Nothing clever, nothing to maintain every week. A handful of <link> tags in the head of the page.
The awkward part: one URL, nine languages
The textbook version of hreflang assumes one URL per language — /en/, /es/, /fr/ and so on. My site does not work like that. There is one URL, and the language lives in the browser's local storage and a small hash in the address bar. There is no /es/ page to point a Spanish hreflang tag at.
I had two honest choices: restructure the site into one page per language — nine copies of every tool page and a maintenance headache I did not want — or accept that hreflang is designed for a setup I do not have, and do the next best thing.
What I did was smaller, and it matched how the site really works. Each tool page keeps its single canonical URL, and I added hreflang tags that point at that same canonical URL with the language codes the page actually supports through its dictionary. The tags say: this page is available in English, Spanish, French, German, Portuguese, Italian, Arabic, Indonesian and Hindi. Google now knows the translations exist instead of guessing from whatever state its crawler happened to catch.
Is it the textbook implementation? No. But it stopped the mixing, and a small, honest signal beats a perfect setup I would never maintain.
Three things I learned
First, declare the default. One of the tags should carry x-default, which tells Google which version to show when no language matches. Mine points at the English page, because that is the fallback the dictionary uses when a string is missing.
Second, keep the list honest. I only list languages the dictionary actually covers. Adding a language code for a translation that does not exist would be worse than having no tag at all, because Google would send visitors to a page that is half in a language they do not speak.
Third, hreflang is not a ranking trick. It will not make a page rank higher. It stops the wrong version from ranking for the wrong person, which is a different and quieter kind of win.
The takeaway
International SEO sounds like a big job, and for a big site it is. For a small tool site with one page and a dictionary, it is about ten lines in the head of the document. The lesson I keep relearning: the boring tag, added honestly, beats the clever solution I never ship.
If your tool has a language switcher and one URL, check what Google thinks your page is written in. You might be surprised — and the fix might be smaller than you think.


