WordPress.org

Forums

Polylang
Different domains and Multisite (6 posts)

  1. Romain Carlier
    Member
    Posted 10 months ago #

    Hi,

    First of all, thank you for this wonderful tool, we moved from WPML and Polylang is a better fit for what we do.

    We have a website with network capabilities enabled, and the polylang (1.5) plugin installed globally on the network. We have multiple websites, each with multiple languages.

    Our WordPress (3.9.1) is installed in a subfolder, and the project files (themes, plugins, uploads) are in an "app/" folder at root. The wp-config.php file is updated to reflect this structure.

    The problem appears when we try to use the "The language is set from different domains" option (in the Settings pane of polylang) : We have multiple domains, let's say domain1.com and domain2.com. The blog domain is set as "domain1.com" and its path is "/". Then, in the polylang configuration, we specified that "domain2.com" would be the english version of the site. The default site is on "defaultdomain.com".

    When we try to reach "domain2.com" (english version of a site), we are redirected to the network default site, defaultdomain.com.

    Is it something you already heard about ? How can we solve this ? I haven't found recent information adressing this issue, but if you have indications, maybe we can get our hands dirty with the code and try to get more information.

    Thank you,
    Romain

    https://wordpress.org/plugins/polylang/

  2. Patrik Illy
    Member
    Posted 10 months ago #

    Hi,
    same problem within my multisite instalation.

    I've setup custom domains within MU Domain Mapping and uncheck option "Disable primary domain check." because I don't want something like site1.wordpressmu.work like a primary domain. I need only newly created domains.

    So I created site1.work for my default language and set as primary and site1en.work for second language. Second language domain is redirected to the first default language domain.

    Sorry for my english :)

  3. Jory Hogeveen
    Member
    Posted 5 months ago #

    Exact same problem here.. I'm just not sure if it is a MU problem or a Polylang problem.

  4. Jory Hogeveen
    Member
    Posted 5 months ago #

    I've might have found a sollution for you aswell.

    https://wordpress.org/support/topic/domain-mapping-with-translation-plugins

    Workflow:

    In "Domain Mapping" on your network admin select "Disable primary domain check".
    Now all domains linked to a blog will be working. Keep in mind that this can result in duplicate content if you don't use multiple languages!

    So if you have more client-sites running in this network you can't use the primary-domain function of MU Domain Mapping. Instead you'll need to redirect the non-primary domains in your server (add sites as an alias). With this workflow you won't need the add the non-primary domains in your wordpress network since the server is handling these redirections.

    IMPORTANT: Make sure that the siteurl and the homurl is the same as your primary language domain!

    Maybe not the best sollution since you can only do this if you need an Plesk of Cpanel in order to do this, but it works :).

    What would be awesome is that MU Domain Mapping could create an update where you can select de "Disable primary domain check" for each blog...

  5. lloydo3000
    Member
    Posted 5 months ago #

  6. Jory Hogeveen
    Member
    Posted 5 months ago #

    Good one, I haven't thought about the admin-login url. I've tried it and you can indeed login with the other domain aswell and this changes the language domains in Polylang. Though in my case it all still works.. even the alternate url's in the head is still working.

    the main thing is that you must not save the language settings on an other domain than the primary-language domain.

Reply

You must log in to post.

About this Plugin

  • Polylang
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic