What do I have:
- Drupal 8.6.2
- Domain Access
- Language modules
- Cloudflare with https
If in URL language detection option (/admin/config/regional/language/detection/url) I have "Path prefix" - everything works fine.
Party starts, when I change it to "Domain" - every ajax request on any subdomain is trying to get through http instead of https and I can see "mixed content error" in console, so these requests are being blocked and website is malfunctioning. I cant use views propeerly, upload files through Plupload, use autocomplete forms, change some settings etc.
If I change it back to prefix - ajax works great again.
For prefix I have site.com for default language and site.com/en - for english. For domain setting: site.com - default and en.site.com is english version.
In Domain Access settings I've tried to set all possible URL schemas (http, https and variable) - no change. In Cloudflare settings I have speacial rules, redirecting every request from http to https (I set up CF's https for dozen of websites, I know how to do it).
If I set back to prefix and go to en.site.com (it still works as an alias for the main domain) ajax works fine, so this is not something about server or background settings - it's just Drupal messing around.
I could run it with prefix, but for SEO purposes it is better to use subdomain, because website is going to be big and it is better to separate languages technically on different websites, search engines will rank these subdomains more correct.
Please help! This is my first experience with multilingual website and I don't have a clue what to do.