Adding Priority Value to sitemap.xml

Issue

  • The priority value is important for search engine optimization (SEO) as it helps to understand the relative importance of different pages on a website. How to add the priority value in the generated Liferay DXP sitemap.xml?

Environment

  • Liferay DXP

Resolution

  • We can set a default value for the priority adding the property sites.sitemap.default.priority. This value will be used by the visiting robots as the default priority for pages in the sitemap.
  • Is it possible to change the priority value in Page Settings, navigating to SEO tab and adjust the priority value according to the desired relative importance of the page.
  • The generated sitemap will have the following format:
<url>
<loc>http://localhost:8080</loc>
<lastmod>2023-05-24T12:37:20+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>1.0</priority>
<xhtml:link href="http://localhost:8080/es/" hreflang="es-ES" rel="alternate"/>
<xhtml:link href="http://localhost:8080" hreflang="en-US" rel="alternate"/>
<xhtml:link href="http://localhost:8080/pt/" hreflang="pt-BR" rel="alternate"/>
<xhtml:link rel="alternate" hreflang="x-default" href="http://localhost:8080"/>
</url>

Additional Information

¿Fue útil este artículo?
Usuarios a los que les pareció útil: 0 de 0