search Where Thought Leaders go for Growth

Create an SEO-compatible multilingual WordPress site

Create an SEO-compatible multilingual WordPress site

By Fabien Paupier

Published: November 11, 2024

WordPress now lets you create sub-sites from a master site. This option, called "multisite" in WordPress, opens the door to many applications, including the creation of multilingual sites. The option can be activated when creating a new site, or afterwards. Find out how in our WordPress tutorial.

What you need to know before setting up a multilingual site

  • If the operation is to be carried out on an existing site, we strongly recommend that you back up your database and files beforehand.
  • Without the help of a third-party plugin, the French site pages will not be linked to the English translations. The two versions are independent and may have different tree structures.
  • You have to choose whether you prefer a sub-domain or directory organization. Here are the main differences:
    • Subdomains: fr.monsite.com, en.monsite.com.
      Subdomains save you extra depth in URLs. URLs are shorter. It's also the only option for an existing site (versus a new installation).
    • Directories: monsite.com/en, monsite.com/en.
      This method is preferred by Google. Thanks to the addition of traffic from the various translations, the authority of the monsite.com domain will be reinforced. However, if you wish to convert an existing site, this option is not available. You can only create a multilingual site with directories as part of a new installation (for the time being).
  • You must deactivate all plugins (third-party extensions) before starting the operation.

Activate the multisite option in WordPress

To activate the ability to create a set of sub-sites in different languages, you need to edit the wp-config.php file at the root of your site:

  1. Connect to your server with FileZilla or other FTP software
  2. Right-click on wp-config.php and select "Edit".
  3. In the document that opens on your screen, add the following line above "/* That's all, don't touch what follows! Happy blogging! */" :
    define('WP_ALLOW_MULTISITE', true);
  4. Save the file and send it back to the server, overwriting the previous version.

Installing the site network

The site network refers to the main site (corporate showcase) and all sub-sites (local versions). To activate it, go to Tools > Network settings. The network name you are asked to enter is the name of your company or organization. Click on Install.

Activate site network

This is the last step before creating the first sites in English, French, Spanish, etc. You need to edit 2 files in the root of your site, as WordPress asks you to do.
Add the first lines below to the .htaccess file and the second lines to the wp-config.php file as above:

If the .htaccess file doesn't yet exist, you need to create it using a simple text editor. When you save your document, simply call it ".htaccess".

Creating English, French, Spanish, etc. site declensions

Your WordPress is now organized into a set of sites. Go to My Sites (top left of screen) > Network > Sites. From this view you can create the first translation of your site in a sub-domain (fr.monsite.com) or directory (www.monsite.com/fr):

Good and bad SEO practices

As we saw above, the sub-domain structure is preferred by Google. Here are some other important points to consider:
  • Don't redirect visitors with French IP addresses to monsite.com/fr. You could prevent Google's robots from crawling your site.
  • Add the href tag to indicate the language of each site to search engines: <link rel="alternate" hreflang="fr" href="http://www.monsite.com/fr" />
  • Report the different sub-sites in Google Webmaster Tools and add the sitemap of each sub-site.

We advise you not to create all the sub-sites at once, but to do them one after the other. This will enable you to see what you can duplicate and what you need to redo systematically. Don't hesitate to read our other tutorials on how to switch your site to HTTPS or how to add an icon to your WordPress site.

Article translated from French