Give each language its own URL
When the main content genuinely exists in Persian and English, each version should have its own address. Switching language entirely with JavaScript on one URL creates a weaker model for search discovery, sharing and analytics.
hreflang must be reciprocal
Google’s guidance says every language version should reference itself and the other language versions. If Persian points to English but English does not point back, the annotation can be ignored.
Do not confuse canonical and hreflang
A Persian page should not canonicalize to the English page simply because the topic is equivalent. When both versions contain properly translated main content, each page should normally self-canonicalize and use hreflang to describe the relationship.
Translate the main content
Translating navigation while leaving the article itself in another language is not a real localized version. Google determines language from content rather than relying only on the HTML language attribute.
HTML or sitemap?
Google supports HTML annotations, HTTP headers and sitemaps. For a small bilingual site, head annotations are easy to inspect. If hreflang is also generated in a sitemap, keep both implementations consistent.
Common mistakes
- Relative URLs instead of fully qualified alternates.
- Missing return links.
- Invalid language or region codes.
- Canonicalizing every language to one version.
- Leaving the main content untranslated.
Official reference: Google Search Central — localized versions.
Implementation path: Technical SEO Systems for Modern Web.
Related work: Case Study — Vilara.
Working on a similar problem?
Send the brief and we’ll clarify the problem, architecture and execution path.
Start a Project →