Configuring Virtual Hosts Site URLs

A virtual host connects a domain name (e.g., www.helloworld.com) to a site. This can be a full domain or a subdomain (e.g. developers.helloworld.com). You can use this to host many websites as separate sites on one Liferay DXP server.

  1. With your provider, set the DNS name to point to your Liferay DXP instance’s IP address. You can refer to a guide from a common provider on how to assign a domain as an example.

  2. Inside Liferay DXP, open the Site Menu (Site Menu), expand Configuration, and go to Site SettingsSite ConfigurationSite URL.

    Under Site Configuration, go to Site URL.

  3. Enter the desired domain or subdomain in the Virtual Host field (e.g., www.helloworld.com, http://developers.helloworld.com).

    You can point virtual hosts to specific locales.

    Important

    A domain can only be applied to a single site. You can’t map a single domain to multiple sites.

  4. (Optional) Since Liferay 7.3 GA2, click the Plus button (Plus Button) for additional Virtual Host domains.

  5. (Optional) Since Liferay 7.3 GA2, select a language for each virtual host. If you have a domain for each translation of a site, you can add a virtual host for each domain.

    Note

    Locales are constrained to the site’s available languages, if defined. If a locale isn’t specified, the default locale for the site is used. The locale applies to sites for all associated domains.

    You can add multiple virtual hosts to point to different domains.

  6. Click Save.

Your site is now accessible using the configured domain.

Capabilities

Product

Contact Us

Connect

Powered by Liferay
© 2024 Liferay Inc. All Rights Reserved • Privacy Policy