Title: Default language always on when serving pages over HTTPS on a dual HTTP(S) setup
Last modified: August 22, 2016

---

# Default language always on when serving pages over HTTPS on a dual HTTP(S) setup

 *  [Luis Rodrigues](https://wordpress.org/support/users/goblindegook/)
 * (@goblindegook)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/default-language-always-on-when-serving-pages-over-https-on-a-dual-https-setup/)
 * We have the following problem when using Polylang on a setup that allows HTTP
   and HTTPS simultaneously.
 * Everything works fine when using HTTP. (This is the URL scheme used by default,
   by the way.)
 * However, when serving pages over HTTPS, Polylang always sets the default language
   instead of using the language requested by the user.
 * For example, when I request an English-language post, the post content appears
   correctly but everything else (menus, strings, etc.) is returned in the site’s
   default language.
 * Are you perhaps relying on the default URL — *including* its scheme — when parsing
   requested URLs for language information?
 * Configuration:
 * * WordPress 4.0 (multisite, main site)
    * Polylang 1.6 * Configured languages:
   pt_PT and en_US * Default language: pt_PT * Checked: The language is set from
   the directory name in pretty permalinks * Checked: Hide URL language information
   for default language * Checked: Remove /language/ in pretty permalinks * Unchecked:
   When the front page is visited, set the language according to the browser preference
 * [https://wordpress.org/plugins/polylang/](https://wordpress.org/plugins/polylang/)

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Plugin Author [Chouby](https://wordpress.org/support/users/chouby/)
 * (@chouby)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/default-language-always-on-when-serving-pages-over-https-on-a-dual-https-setup/#post-5492868)
 * Hi!
 * Please disable teh option PLL_CACHE_HOME_URL
    [http://polylang.wordpress.com/documentation/documentation-for-developers/list-of-options-which-can-be-set-in-wp-config-php/](http://polylang.wordpress.com/documentation/documentation-for-developers/list-of-options-which-can-be-set-in-wp-config-php/)
 *  [t.jacob](https://wordpress.org/support/users/tjacob-1/)
 * (@tjacob-1)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/default-language-always-on-when-serving-pages-over-https-on-a-dual-https-setup/#post-5492929)
 * Hi Chouby,
 * Disabling the option PLL_CACHE_HOME_URL did not made any changes.
 * When serving pages over HTTPS, Polylang always sets the default language instead
   of using the language requested by the user.
 * Do you have any idea what might be causing this behaviour?
 *  Plugin Author [Chouby](https://wordpress.org/support/users/chouby/)
 * (@chouby)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/default-language-always-on-when-serving-pages-over-https-on-a-dual-https-setup/#post-5492951)
 * Could you give a link?
 *  [t.jacob](https://wordpress.org/support/users/tjacob-1/)
 * (@tjacob-1)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/default-language-always-on-when-serving-pages-over-https-on-a-dual-https-setup/#post-5492958)
 * The english site is not public yet, so i am not allowed to share the link. Also,
   only some IP addresses can access it (we have some restrictions configured in
   the http server).
    Is there other way you can help us?
 *  Plugin Author [Chouby](https://wordpress.org/support/users/chouby/)
 * (@chouby)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/default-language-always-on-when-serving-pages-over-https-on-a-dual-https-setup/#post-5492966)
 * I asked for a link because I am not sure to perfectly understand the problem.
   
   Does it happen on all pages? (homepage, single page, monthly archives) Is there
   a redirection to a wrong content? Is the content served correct and only the 
   theme is not in the correct language?
 *  [t.jacob](https://wordpress.org/support/users/tjacob-1/)
 * (@tjacob-1)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/default-language-always-on-when-serving-pages-over-https-on-a-dual-https-setup/#post-5492970)
 * The only things working are posts and pages, when translated, which means that
   the language switcher knows the correct path to translated posts or pages.
 * Looking to the request/response, the correct language is requested (en_EN) but
   the response has the default language (pt_PT) as shown below (setting the cookie):
 * **Requests on HTTP, to /en**
 *     ```
       Remote Address:10.10.10.10:80
       Request URL:http://MYSITE.COM/en/
       Request Method:GET
       Status Code:200 OK
       Request Headersview parsed
       GET /en/ HTTP/1.1
       Host: MYSITE.COM
       Connection: keep-alive
       Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
       User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.122 Safari/537.36
       DNT: 1
       Referer: http://MYSITE.COM/
       Accept-Encoding: gzip,deflate,sdch
       Accept-Language: en-US,en;q=0.8
       Cookie: PHPSESSID=3l3d4sqferc20torja9ed6os54; cookie_notice_accepted=true; pll_language=pt; wordpress_test_cookie=WP+Cookie+check; w3tc_logged_out=
       Response Headersview source
       Cache-Control:no-store, no-cache, must-revalidate, post-check=0, pre-check=0
       Connection:keep-alive
       Content-Encoding:gzip
       Content-Type:text/html; charset=UTF-8
       Date:Wed, 19 Nov 2014 16:19:45 GMT
       Expires:Thu, 19 Nov 1981 08:52:00 GMT
       Link:<http://MYSITE.COM/wp-json>; rel="https://github.com/WP-API/WP-API"
       Pragma:no-cache
       Server:nginx/1.0.15
       Set-Cookie:pll_language=en; expires=Thu, 19-Nov-2015 16:19:43 GMT; Max-Age=31536000; path=/; domain=.MYSITE.COM
       Transfer-Encoding:chunked
       Vary:Accept-Encoding
       X-Pingback:http://MYSITE.COM/xmlrpc.php
       ```
   
 * ——————————————————————
 * **Requests on HTTPS, to /en**
 *     ```
       Remote Address:10.10.10.10:443
       Request URL:https://MYSITE.COM/en/
       Request Method:GET
       Status Code:200 OK
       Request Headersview parsed
       GET /en/ HTTP/1.1
       Host: MYSITE.COM
       Connection: keep-alive
       Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
       User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.122 Safari/537.36
       DNT: 1
       Referer: https://MYSITE.COM/
       Accept-Encoding: gzip,deflate,sdch
       Accept-Language: en-US,en;q=0.8
       Cookie: PHPSESSID=3l3d4sqferc20torja9ed6os54; cookie_notice_accepted=true; wp-settings-14=hidetb%3D1%26editor%3Dhtml%26posts_list_mode%3Dlist%26libraryContent%3Dbrowse; wp-settings-time-14=1416395461; wordpress_test_cookie=WP+Cookie+check; w3tc_logged_out=; pll_language=pt
       Response Headersview parsed
       HTTP/1.1 200 OK
       Server: nginx/1.0.15
       Date: Wed, 19 Nov 2014 16:21:22 GMT
       Content-Type: text/html; charset=UTF-8
       Transfer-Encoding: chunked
       Connection: keep-alive
       Vary: Accept-Encoding
       Expires: Thu, 19 Nov 1981 08:52:00 GMT
       Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
       Pragma: no-cache
       X-Pingback: https://MYSITE.COM/xmlrpc.php
       Link: <https://MYSITE.COM/wp-json>; rel="https://github.com/WP-API/WP-API"
       Content-Encoding: gzip
       ```
   
 *  [t.jacob](https://wordpress.org/support/users/tjacob-1/)
 * (@tjacob-1)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/default-language-always-on-when-serving-pages-over-https-on-a-dual-https-setup/#post-5492971)
 * Btw, the cookie in https is not rewritten, it stays always the same.
 *  Plugin Author [Chouby](https://wordpress.org/support/users/chouby/)
 * (@chouby)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/default-language-always-on-when-serving-pages-over-https-on-a-dual-https-setup/#post-5493051)
 * I just uploaded a new development version (1.6.1.1). Could you tell me if the
   situation is improved?
    [https://downloads.wordpress.org/plugin/polylang.zip](https://downloads.wordpress.org/plugin/polylang.zip)
 *  [t.jacob](https://wordpress.org/support/users/tjacob-1/)
 * (@tjacob-1)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/default-language-always-on-when-serving-pages-over-https-on-a-dual-https-setup/#post-5493074)
 * Chouby,
    The latest version (1.6.1.1) did resolved the problem! Thank you very
   much.
 *  Plugin Author [Chouby](https://wordpress.org/support/users/chouby/)
 * (@chouby)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/default-language-always-on-when-serving-pages-over-https-on-a-dual-https-setup/#post-5493075)
 * [@luis](https://wordpress.org/support/users/luis/) Rodrigues
    Does it solve the
   problem for you too?

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Default language always on when serving pages over HTTPS on a dual HTTP(
S) setup’ is closed to new replies.

 * ![](https://ps.w.org/polylang/assets/icon-256x256.png?rev=3433336)
 * [Polylang](https://wordpress.org/plugins/polylang/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/polylang/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/polylang/)
 * [Active Topics](https://wordpress.org/support/plugin/polylang/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/polylang/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/polylang/reviews/)

## Tags

 * [default language](https://wordpress.org/support/topic-tag/default-language/)
 * [HTTP](https://wordpress.org/support/topic-tag/http/)
 * [HTTPS](https://wordpress.org/support/topic-tag/https/)

 * 10 replies
 * 3 participants
 * Last reply from: [Chouby](https://wordpress.org/support/users/chouby/)
 * Last activity: [11 years, 6 months ago](https://wordpress.org/support/topic/default-language-always-on-when-serving-pages-over-https-on-a-dual-https-setup/#post-5493075)
 * Status: not resolved