WPML allows you to create a specific root page for your site. This means that regardless of the available languages in your site, the starting page will be the same for all your visitors

WPML lets you create virtual directories for all languages, including the default language. These are not real physical directories on the server’s drive, but virtual directories that only appear in URLs.

Please note that when the Use directory for default language option is set on the WPML -> Languages page, a root page must be used.

With language folders for all languages, your site’s structure can look like:

mysite.com/en/
mysite.com/es/
mysite.com/fr/

To enable this, go to WPML->Languages and scroll down to the Language URL format section.

Directory for the default language

Directory for the default language

What is a root page and do I need one?

The root page of your website is the content that loads when visitors access your domain name, i.e. “mysite.com” in a web browser. In case you are using the Use directory for default language option, the starting page will be the same for all your visitors, regardless of the available languages on your site.

The following image displays a simple example of a root page, which features a welcome message and links to the site’s language versions.

Front-end root page

Front-end root page

Setting up the root page

In order to use a root page, you first must select the Different languages in directories option.

Then, enable the Use directory for default language option.

Now, you must choose what goes into your site’s root URL. For the root URL, you can choose between a WordPress page or an HTML file.

Selecting an HTML file

When you choose an HTML file, you need to provide its path. If the path starts with a slash “/”, it is an absolute path on the server. Otherwise, it is relative to the WordPress directory.

Using a relative path

You can upload the HTML file you want to use for your root page using a FTP program and place it under your site’s WordPress directory as shown in the following image.

Uploading an HTML file to your WordPress directory

Uploading an HTML file to your WordPress directory

Once the file is uploaded, you can set its relative path, by simply specifying the file’s name. For example, “root-page.html”, as shown in the following image.

Add the HTML to the HTML file option

Add the HTML to the HTML file option

Using an absolute path

If you want to use an absolute path on your server you can upload your HTML file in any of the site’s folders, as displayed in the following image.

Upload a HTML file in your directory

Upload a HTML file in your directory

Once the file is uploaded, you can set its absolute path, for example “/home/andres/root-page.html”.

Selecting a WordPress page

If you choose A page option, save your settings first and then click on the Create root page link.

Click on the Create root page link

Click on the Create root page link

This redirects you to the WordPress page editor interface.

Here, you can design how you want your site’s root, main landing page to look like. For example, some sites display a welcome message and provide a large language selection interface.

WordPress root page example

WordPress root page example

Once you have added your content, save the page.

That’s it! When visitors come to your site, this page will be used as the root, landing page, regardless of the available language preferences.

How to edit an existing root page

When you select to use a standard WordPress page as your root page, it will not be listed on the usual Pages listing page.

To edit your root page, you need to go to the WPML -> Languages page, scroll to the Language URL format section, and click the Edit root page link.

Link to edit an existing root page

Link to edit an existing root page