Adding Priority Value to sitemap.xml
Written By
Jamilly Macedo
How To articles are not official guidelines or officially
supporteddocumentation. They are community-contributed content and may
not alwaysreflect the latest updates to Liferay DXP. We welcome your
feedback toimprove How to articles!
While we make every effort to ensure this Knowledge Base is accurate,
itmay not always reflect the most recent updates or official
guidelines.We appreciate your understanding and encourage you to reach
out with anyfeedback or concerns.
Legacy Article
You are viewing an article from our legacy
"FastTrack"publication program, made available for
informational purposes. Articlesin this program were published without a
requirement for independentediting or verification and are provided
"as is" withoutguarantee.
Before using any information from this article, independently verify
itssuitability for your situation and project.
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?
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>
Did this article resolve your issue ?