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
Subscriber Exclusive Content
A Liferay Enterprise Subscription provides access to over 1,500 articles that include best practices, troubleshooting, and other valuable solutions. Sign in for full access.
Sign In