Skip to content

Unify URLs with the “Link finisher”

The “Link finisher” automatically converts all website links into a uniform format optimized for web analytics tools and search engines. This means that editors don't have to worry about technical details when referring to container pages internally.
Date:
KW 41 / 2025

As the World Wide Web has evolved, various forms of website URLs have emerged. As a rule, a container page in OpenCms can be accessed in the form ending in /index.html and with or without a slash at the end:

https://www.opencms.org/en/contact/index.html
https://www.opencms.org/en/contact/
https://www.opencms.org/en/contact

In the OpenCms workplace, there are also these ways to link to a container page.

For web analytics tools and search engines, having different URLs for the same page is not ideal. Analytics tools have to combine the URL variants in their evaluation, and search engines may consider this to be “duplicate content”.

If the new link finisher is activated on a website, all container pages can still be accessed under the different URL variants as before, but OpenCms itself only publishes a single form externally, namely the form without /index.html. This applies to all links in the HTML <body> of a website as well as the links in the SEO file sitemap.xml.

The link finisher can be activated via the sitemap attribute “template.link.finisher” with the value “foldername”. With the additional sitemap attributes “template.link.finisher.exclude” and “template.link.defaultfiles”, paths can be excluded from normalization or additional file names such as “index.html” for normalization can be added.

The link finisher requires that the <cms:link> tag or the CmsJspLinkWrapper class be used consistently in the JSP template provided by the agency.