Scroll Top

Web design with love

Our blog

All about web design

WordPress web design course

WPML

with different domains

It's all about web design. Welcome to my WordPress web design and SEO blog! Here, I'll explore every facet of crafting a captivating website, from layout and aesthetics to search engine optimization strategies. Join me on this journey as we uncover the secrets to building a successful online presence that stands out in the digital landscape.

WPML, WordPress Multilingual is one of the well known plugins to make your website multilingual. Of course there are many other plugins available to create a second or third language on your website (i.e. Polylang). I just started many years ago with WPML and I think it is one of the best plugins to translate a whole website. With WMPL you can really translate each and every page and every single word, and even more important WMPL is compatible with many many other plugins.

Today I want to show you how to set up WPML in case you want to make your website multilingual with different domains. As you might know there are two basic setup options for different languages on your site. Either you choose to set it up on separate folders, or you do that with different domains. The domain can also be a subdomain of your existing domain.

The urls in case you want your different languages in folders would look like that:

Main language: https://mysite.com/ (let’s say that’s your website in English)
German language: https://mysite.com/de/ (that would be the url for your landing page in German)
Greek language: https://mysite.com/el/ (and the same syntax for your website in Greek)

But because today I want to show you the second option, setting up your website in different languages with different domains, the result at the end could for example be:

Main language: https://mysite.com/ (that of course will stay the same for i.e. the primary language English)
German langugae: https://de.mysite.com/ (that could be a subdomain of your main domain)
Greek language: https://mysite.gr/ (and that could be a real .gr domain)

So as you can see, you can mix the domains, in our case one subdomain and one domain. What you cannot do is setting up your multilingual website with folders and domains, meaning a mix is not possible

So let’s get started!

Buy and set up your desired domains

Well it is clear that the first step has to be to either buy your new domain for the additonal language, or to set up your subdomains. Of course this can be a little bit different, according to the hosting company you got. I will show you the setup with my prefered hosting, which is Hetzner.

So let’s stay with our example mentioned before, and set up our multilingual WordPress website like that:

https://mysite.com/ (existing English version)
https://de.mysite.com/ (creating a subdomain for the German language)
https://mysite.gr/ (buying the new domain for the Greek language)

First step is to sign-in to your admin panel of your hosting company and add the subdomain to your existing domain. As told in my case this is Hetzner, and it is quite easy to add the subdomain, in KonsoleH, settings, subdomain. Just add the short name for your language, in our case thats “.de” to create your subdomain for the language German. Important! Don’t forget to point the subdomain to the folder where you uploaded your original WordPress files. As you can see on the screenshot in my case that’s not the root, it’s the folder “wema”. Of course it is possible that you have uploaded your original WordPress files in root. In that case you point your subdomain also to root!

Adding a subdomain

Next thing we got to do is adding a SSL certificate to the new subdomain. Also very easy in case of Hetzner Hosting, I guess it will be just as easy with your hosting company. Just do not forget to add the certificate! Having set up the subdomain and having added the SSL certificate, our subdomain for the German language (remember https://de.mysite.com) is ready to be used as domain in WPML for the German language!

Adding a SSL certificate

The next step regarding our domains is to buy the domain name we want to use for the third language, in our case the .gr domain mysite.gr. Just check out that your desired domain is available using a domain checker like at Hetzner Domain check

According to your hosting company and the hosting package you bought for your original WordPress website (in our case the .com domain) it could be possible to just buy an “addon” domain. This would save you some money and it is sufficient to add the third language to that domain. In my example it is really just an addon domain, without additional hosting space. Buying the addon domain at Hetzner is also very easy: sign in to your account, choose “new order” and scroll down to the end where you can see “addon domain”.

Buy an addon Domain

When the domain or addon domain is set up by your hosting company, you have to point this new domain again to the folder where your main domain is uploaded. We already did that with the subdomain, so it is again the same steps. Choose your new domain and set the start folder to either “root” or the folder you created for your main domain.

And again you got to add a SSL certificate to your new (addon) domain. Nothing new here anymore.

And a very important part so your new domain will work later on for the WPML setup, your new domain must have the same DNS settings as your main domain. The name servers must be the same, otherwise it will not work. Most times the hosting company can do that for you!!

Now all is set up correct and we can start setting up WPML Multilingual on the WordPress admin panel.

WPML Setup for different domains

Having setup your domains correct, this is really quite the easy part. Download the plugins WMPL Multilingual CMS, WPML String Translation and WPML Media Translation (which for sure you will need later on translating your website). I suppose you already know how to add and activate plugins so I can just skip that part.

The setup manager of WPML is really great and easy. You got to add the languages you would like to have, a language switcher and the design of your language switcher.

At the point where you are asked how to handle the language url format, you just activate “a different domain per language”. You will see your languages set up before and just add the domains or the subdomain and domain we set up before. Again, this means:

English is the default and already set up, you can’t change that
English: https://mysite.com/
And we add
German: https://de.mysite.com/
Greek: https://mysite.gr/

We leave all the other settings as they are and save our settings. That is all. The domains should be ready and you can start translating your website.

WPML settings

Feel free to ask me in case you got any problem or just leave a comment. I am happy to help you.

Related posts

Add Comment