You’ve decided it’s time for your website to speak multiple languages. Excellent idea! This will expand your audience and improve your search engine rankings. One of the most professional and convenient ways to do this is by using subdomains.
Here’s what it looks like:
- Main English site:
mysite.com - Russian version:
ru.mysite.com - German version:
de.mysite.com
This approach is favored by search engines (like Google) and is user-friendly. However, setting it up requires a little bit of technical work.
Don’t be intimidated by terms like DNS, hosting, and SSL. In this guide, we will break down every step as if you’re doing this for the first time, explaining everything in the simplest terms possible.
- 🤔 Before You Start: Where to Find the Right Settings?
- 🔹 Step 1: Configuring DNS: Telling the Internet Where Your Subdomains Live
- 🔹 Step 2: Configuring Your Hosting: Teaching Your Server to Understand Subdomains
- 🔹 Step 3: The SSL Certificate: Enabling HTTPS for All Subdomains
- 🔹 Step 4: Configuring WordPress: Making Your Site Work on All Addresses
- 🔹 Step 5: Installing the Polylang Plugin in WordPress
- 🔹 Step 6: Translating Content and Verifying
- 🎯 Summary & What to Do If It Doesn’t Work
🤔 Before You Start: Where to Find the Right Settings?
To get everything working, we need access to three key components of your website. Let’s figure out what they are.
- Domain Registrar
- What is it? The company where you bought your site’s name (
mysite.com). Examples: GoDaddy, Namecheap, Google Domains. - Analogy: This is like the city records office where you registered a unique address for your house.
- What we need there: The DNS management panel.
- What is it? The company where you bought your site’s name (
- Hosting Provider
- What is it? The company that provides server space where your website’s files are physically stored. Examples: Bluehost, SiteGround, Hostinger. Sometimes, the domain registrar and hosting provider are the same company.
- Analogy: This is the plot of land and the actual house that stands at your address.
- What we need there: The hosting control panel (like cPanel, Plesk, or DirectAdmin) and the file manager.
- Cloudflare (if you use it)
- What is it? A popular service that acts as a middleman between your visitors and your hosting. It speeds up your site and protects it from attacks.
- Important: If your site is connected to Cloudflare, you must manage your DNS records in Cloudflare, not at your domain registrar.
How to know where your DNS settings are managed?
- Step 1: Log in to your domain registrar’s website. Find a section called “DNS” or “Manage Domain.”
- Step 2: Look for your “Nameservers” (or NS records).
- If they look like
ns1.myhosting.comandns2.myhosting.com, your DNS is managed by your hosting provider. - If they look like
olga.ns.cloudflare.comandjason.ns.cloudflare.com, your DNS is managed by Cloudflare. - In most other cases, your DNS is managed by your domain registrar.
- If they look like
Now that we know where everything is, let’s get started.
🔹 Step 1: Configuring DNS: Telling the Internet Where Your Subdomains Live
In this step, we need to create “pointers” for our future language versions. For example, when someone types ru.mysite.com into their browser, the browser needs to know which server to go to.
- Log in to your DNS management panel (at your registrar, host, or Cloudflare, as we determined above).
- Find the section called “DNS Records,” “DNS Manager,” or “DNS Zone Editor.”
- We need to add a record for each language. There are two ways to do this: with an A-record or a CNAME-record. We recommend using CNAME, as it’s easier to maintain.
What is a CNAME?
It’s an alias record. It says, “ru.mysite.com should point to the same place as the main site mysite.com.” If your server’s IP address ever changes in the future, you’ll only need to update it for your main domain, and all the subdomains will update automatically.
Create a CNAME record for each language:
| Type | Name (Host) | Target (Value) |
|---|---|---|
| CNAME | ru | mysite.com |
| CNAME | en | mysite.com |
| CNAME | de | mysite.com |
- In the Name field, you only need to enter the subdomain prefix (
ru,en). The system will automatically addmysite.com. - In the Target field, you enter your main domain name.
What to do after adding the records?
Just wait. It can take anywhere from 5 minutes to 24 hours for DNS changes to propagate across the internet (though it usually happens within an hour).
🔹 Step 2: Configuring Your Hosting: Teaching Your Server to Understand Subdomains
Okay, we’ve taught the internet how to find our subdomains. Now we need to teach our hosting server how to respond correctly. It needs to understand that a request for ru.mysite.com should open the exact same website as mysite.com.
- Log in to your hosting control panel (cPanel, Plesk, etc.).
- Find the section called “Subdomains” or “Aliases” (sometimes called “Parked Domains”). “Aliases” is often the correct choice, but “Subdomains” will also work if that’s your only option.
- Create a subdomain for each language:
ru.mysite.com,en.mysite.com, etc. - The most important part is the Document Root. Your main WordPress site is located in a folder, usually named
public_html,www, ormysite.com/public_html. All of your subdomains must point to this same folder! ⚠️ Critically Important:- ❌ Wrong: Your hosting panel suggests creating the subdomain in a new folder like
/public_html/ru. This will create a new, empty website. - ✅ Correct: You manually specify that the document root for
ru.mysite.comis/public_html(or wherever your main site is located).
- ❌ Wrong: Your hosting panel suggests creating the subdomain in a new folder like
All subdomains must be “parked” on top of the same directory where WordPress is installed.
🔹 Step 3: The SSL Certificate: Enabling HTTPS for All Subdomains
To ensure your sites open with the secure https:// protocol (with a padlock icon in the browser), you need an SSL certificate.
- A basic SSL certificate only protects
mysite.comandwww.mysite.com. - For our setup, we need a Wildcard SSL certificate, which protects the main domain and all of its subdomains (
*.mysite.com).
How to get one?
Fortunately, most good hosting providers now offer free Wildcard SSL certificates from Let’s Encrypt.
- In your hosting control panel, find the “SSL/TLS” or “Let’s Encrypt” section.
- Select your main domain (
mysite.com). - When issuing or re-issuing the certificate, make sure to check the box for the “Wildcard” or “Include subdomains” option.
- Issue the certificate. It will automatically be applied to all the subdomains you created in the previous step.
🔹 Step 4: Configuring WordPress: Making Your Site Work on All Addresses
This is a secret but absolutely essential step that many guides forget. Without it, you might run into issues with logging into your admin dashboard or with your site displaying incorrectly. We need to “tell” WordPress itself that it’s now multi-faceted and can be accessed from different addresses.
- In your hosting control panel, open the “File Manager”.
- Navigate to your site’s root folder (
public_html). - Find the file named
wp-config.php. This is one of WordPress’s core files. - Make a backup! Right-click the file and choose “Copy” or “Download” to save a copy to your computer. If anything goes wrong, you can restore the original file.
- Open
wp-config.phpto edit it. - Scroll down until you find the line:
/* That's all, stop editing! Happy publishing. */ - Right before this line, add the following code:
define('WP_SITEURL', 'https://' . $_SERVER['HTTP_HOST']); define('WP_HOME', 'https://' . $_SERVER['HTTP_HOST']);
What does this code do? It dynamically tells WordPress: “Your address is whatever domain is currently in the browser’s address bar.” This allows the core system to work correctly with ru.mysite.com, en.mysite.com, and so on.
Save the changes to the file.
🔹 Step 5: Installing the Polylang Plugin in WordPress
Now that all the technical groundwork is laid, let’s move on to the fun part: setting up the multilingual functionality in WordPress.
- Log in to your WordPress admin dashboard.
- Go to Plugins → Add New.
- In the search bar, type Polylang and install it. After it’s installed, don’t forget to click “Activate.”
- Once activated, go to the new menu item Languages → Settings.
- Open the “URL modifications” tab.
- You will be presented with several URL structure options. Choose the one we need:
✅ “The language is set from the subdomain name (e.g.,ru.mysite.com)”. - Save the changes.
- Now, go to the “Languages” tab and add the languages you need. For example: Russian (ru), English (en), German (de). Polylang will automatically associate them with the corresponding subdomains.
🔹 Step 6: Translating Content and Verifying
The hard part is over! Now you can start translating your pages and posts.
- Open any existing page to edit it. On the right-hand side, in the settings panel, you will see a “Languages” block.
- Click the
+icon next to a language to create its translation. - WordPress will create a new, blank page that you can fill with content in the new language. Polylang will automatically link it to the original.
- Add a “Language Switcher” widget to your menu or footer (Appearance → Widgets).
Final Check:
- Open your site
mysite.com—it should display in the default language. - Now, type
ru.mysite.cominto your browser—the Russian version should load. - Check the other languages.
- Try using the language switcher widget—it should correctly redirect you between the subdomains.
🎯 Summary & What to Do If It Doesn’t Work
Congratulations! You have just set up a professional multilingual system on your website. Let’s briefly recap the steps:
- DNS (the pointers): We created CNAME records to point the subdomains to the main site.
- Hosting (the server): We “parked” the subdomains onto the main WordPress folder.
- SSL (the security): We installed a Wildcard certificate to protect all versions of the site.
- WordPress (the brain): We added a rule to
wp-config.phpto handle multiple addresses. - Polylang (the translator): We configured the plugin to manage languages via subdomains.
If something went wrong:
- I see a default hosting page: This is a problem with Step 2. You have pointed the subdomain to the wrong document root.
- The browser shows a “Site Not Found” error: This is a problem with Step 1. You either made a mistake in the DNS record, or the changes haven’t propagated yet. Wait a few more hours.
- The site works, but it’s buggy, and I keep getting logged out of the admin area: This is a problem with Step 4. Double-check that you copied the code into
wp-config.phpcorrectly. - The site works, but the languages don’t switch: This is a problem with Step 5. Make sure you have selected the correct URL modification setting (using subdomains) in Polylang.
Your website is now ready to welcome an international audience.