Document URL Displays Virtual Instance Domain Instead of Site Virtual Host
How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!
While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.
Legacy Article
You are viewing an article from our legacy "FastTrack"
publication program, made available for informational purposes. Articles
in this program were published without a requirement for independent
editing or verification and are provided"as is" without
guarantee.
Before using any information from this article, independently verify its
suitability for your situation and project.
Issue
- I've configured a Site with its own Virtual Host (
www.b.com), but when I upload a document to that site, the document's URL incorrectly displays the parent Virtual Instance's domain (www.a.com).
- I expected the URL to use the Site's configured Virtual Host (
www.b.com) instead.
Resolution
- The display of the Virtual Instance's domain in the document URL is intended and expected behavior. The system is designed to not automatically redirect a user to a different domain than the one they initially requested.
- The Site's Virtual Host is an optional, secondary domain for accessing that site's content. If a user accesses the site via the Virtual Instance's domain (
www.a.com), all content, including document URLs, will be served from that same domain to avoid unexpected redirection.
- To ensure the document URLs reflect the Site's Virtual Host, the user must access the site by explicitly navigating to the Virtual Host's URL (e.g.,
http://www.b.com:8080).
- This behavior is consistent across the platform and is not related to the use of Virtual Instances.
Did this article resolve your issue ?