I’m running a WordPress site with Polylang for 5 different languages. Here’s my setup:
Main language (Italian) needs to run on mysite.it
Other 4 languages (English, French, German, Spanish) should work on mysite.com
I configured Polylang to use “different domains” setting, but there’s a weird issue. When I turn this on, the language codes get stripped from URLs on the .com domain.
So instead of mysite.com/en/awesome-pancake-recipe, I get mysite.com/awesome-pancake-recipe
This creates two major problems:
Wrong language detection - The system might think mysite.com/awesome-pancake-recipe is French content because it sees “pancake” and makes wrong assumptions, causing bad redirects
Broken translation links - Posts that should be connected as translations lose their connection completely
Is this how Polylang is supposed to work with domain separation? Can I somehow keep the language prefixes on mysite.com while still having the Italian version on its own domain?
yeah, looks like ur setup might be off. with the domain thing, you shldnt drop lang prefixes. maybe check that ur domain mapping is correct? like ensure mysite.com is the secondary domain for the other 4 langs instead of splitting them.
This behavior is actually expected when using Polylang’s different domains configuration, but it’s not necessarily the best approach for your use case. When you enable domain separation, Polylang assumes each domain represents a specific language context, so it removes the prefixes to clean up URLs. I encountered similar issues on a multilingual corporate site last year. What worked better was keeping all languages on mysite.com with prefixes, then using a redirect plugin to handle the Italian traffic. Set up 301 redirects from mysite.it to mysite.com/it, which maintains your translation relationships while giving you the domain structure you want. Alternatively, you could use subdomain mapping instead - it.mysite.com for Italian and keep the others on the main domain with prefixes. This preserves Polylang’s internal linking system while still providing language-specific domains.
I ran into this exact configuration nightmare about six months ago on a client project. The domain separation feature in Polylang strips prefixes because it treats each domain as inherently language-specific, which breaks the translation linking mechanism you mentioned. Rather than fighting against this behavior, I ended up using a hybrid approach that actually worked better. Keep Polylang on the standard URL structure with prefixes for all languages, but implement server-level redirects at your hosting provider. Configure your DNS so both domains point to the same WordPress installation, then use htaccess rules to redirect mysite.it visitors to mysite.com/it automatically. This preserves all of Polylang’s internal functionality while giving users the appearance of separate domains. The translation links stay intact, language detection works properly, and you avoid the URL confusion entirely. Much cleaner than trying to force Polylang into a configuration it wasn’t designed to handle smoothly.