Identifying Localized Site URLs within the DXP Sitemap Preview

This article documents how to verify that localized site URLs in Liferay DXP 7.0 are being identified properly by web crawlers. Verifying your localized pages is not an easy task. Seen here is the sitemap for a page with three language localizations configured:

http://localhost:8080/sitemap.xml?layoutUuid=cfdce6d6-40bb-1e28-bba3-4ec882b53792&groupId=20143&privateLayout=false

This does not help us as the part in question is hidden. Why isn't it easier to read?

Presently, the design used to generate the sitemap XML is unable to be extended to give a direct URL. To do so would cause the sitemap to not be validated properly, nullifying the purpose of the sitemap. Two additional means can be used to look at the sitemap. The first is to look at the page source of the browser window with the url entered, and the second would be to use an XML viewer.

Follow the steps below to identify localized site URLs.

Resolution

When the URL is placed into a browser with the instance running, it returns the line below.

http://localhost:8080/es/spanish-pagedaily2017-04-26T19:35:27+00:00http://localhost:8080/fr/french-pagedaily2017-04-26T19:35:27+00:00http://localhost:8080/english-pagedaily2017-04-26T19:35:27+00:00

Separating the line into three parts, using http as the break point, gives us three readable lines. These three lines clearly show the localized addresses for the page. One in Spanish, one in French and one in English.

  • http://localhost:8080/es/spanish-page daily 2017-04-26T19:35:27+00:00
  • http://localhost:8080/fr/french-page daily 2017-04-26T19:35:27+00:00
  • http://localhost:8080/english-page daily 2017-04-26T19:35:27+00:00

Additional Information

The format for sitemaps is: <loc><changefreq><lastmod>.

  • <loc> is the URL in question
  • <changefreq> indicates how often the sitemap is expected to change
  • <lastmod> is the date when the sitemap was last changed

More in-depth information can be found here: Sitemaps XML Format 

Was this article helpful?
0 out of 0 found this helpful