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 a number of websites as separate Sites on one Liferay DXP server. Follow these steps to configure virtual hosts Site URLs:
With your provider, set the DNS name to point to your Liferay DXP instance’s IP address.
Inside Liferay DXP, open the Site Menu (), expand Configuration, and go to Site Settings → Site Configuration → Site URL.
Enter the desired domain or subdomain in the Virtual Host field (e.g.,
www.helloworld.com
,http://developers.helloworld.com
).importantA domain can only be applied to a single Site. You can’t map a single domain to multiple Sites.
(Optional) Since Liferay 7.3 GA2, click the Plus button () for additional Virtual Host domains.
(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.
noteLocales 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.
Click Save.
Your site is now accessible using the configured domain.