search Where Thought Leaders go for Growth

Creating an SEO-compatible multilingual WordPress site

Creating an SEO-compatible multilingual WordPress site

By Fabien Paupier

Published: 11 November 2024

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

What you need to know before creating a multilingual site

  • If the operation is carried out on an existing site, it is strongly recommended that you back up your database and files beforehand.
  • Without the help of a third-party plugin, the pages of the French site will not be linked to the English translations. The two versions are independent and may have different tree structures.
  • You must choose whether you prefer an organisation in sub-domains or directories. Here are the main differences:
    • Sub-domain: fr.monsite.com, en.monsite.com.
      Sub-domains save you extra depth in the URLs. URLs are shorter. This is also the only option for an existing site (as opposed to a new installation).
    • Directories: monsite.com/en.
      This method is preferred by Google. Thanks to the addition of traffic from the different translations, the authority of the monsite.com domain will be strengthened. However, if you want 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 your plugins (third-party extensions) before launching the operation.

Activating 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 using 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 anything else! 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 the 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 organisation. Click on Install.

Activate the site network

This is the last step before creating the first sites in English, French, Spanish, etc. You must 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 does not yet exist, you need to create it using a simple text editor. When you save your document, simply call it ".htaccess".

Creating site variations in English, French, Spanish, etc.

Your WordPress is now organised 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 (en.monsite.com) or in a 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:
  • Do not redirect users with a French IP address to monsite.com/fr. You could prevent Google's robots from crawling your site.
  • Add the href tag to indicate to search engines the language of each site: <link rel="alternate" hreflang="fr" href="http://www.monsite.com/fr" />
  • Report the different sub-sites in Google Webmaster Tools and add the sitemap for each sub-site.

We advise you not to create all the sub-sites at the same time, 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 the other tutorials for switching your site to HTTPS or for adding an icon to your WordPress site.

Article translated from French