Skip to content
OpenCms documentation
OpenCms documentation

SEO options dialog

The SEO options dialog provides a simple alias mechanism for the URLs of container pages. This is useful if the URL of a container page changes and you want the container page still be reachable under the old URL.

Open the SEO options dialog

The dialog is available either in the page editor via the context menu entry "Advanced" of the main toolbar or alternatively in the sitemap editor by opening the conext menu of a specific page, again in the "Advanced" menu entry.

SEO_OptionsDialog

The dialog is divided into three parts.

Properties. A form to edit the title, description, and keyword properties of the container page. Changes will only be applied after clicking the "Save" button.

New alias. An area to create new aliases consisting of an alias path and an action. In order to complete a new alias definition, use the plus sign and click the "Save" button. See below for a detailed explanation.

Existing aliases. An overview on all aliases defined for the currently opened container page. Her you can either change the alias path or delete an alias by using the cross sign. Again, changes are only applied after clicking the "Save" button.

In order to create a new alias you have to define an alias path and an action for the container page you are currently editing.

Valid alias paths consist of one or more segments, where each segment consists of a / and one or more characters. This means that they may not end with a trailing /.

There are three actions available:

Temporary redirect (HTTP 302). The defined alias path is redirected to the container page you are currently editing.

Permanent redirect (HTTP 301). The defined alias path is permanently redirected to the container page you are currently editing.

Show page. The container page you are currently editing is shown under the defined alias path without redirecting.

There are two types of aliases in OpenCms, simple aliases and rewrite aliases. Simple aliases are edited with the SEO options dialog explained here whilst rewrite aliases are edited with the edit aliases dialog.

The SEO options dialog is simple and useful for container pages only whilst the edit aliases dialog is for more sophisticated rewrite rules with regular expressions that also work for detail pages and whole folder trees.

There are advantages of using simple aliases over rewrite aliases, though. Besides being simpler, simple aliases keep intact when renaming or moving a container page.

All incoming alias requests are handled by the class org.opencms.main.CmsAliasResourceHandler, which is by default configured in the opencms-system.xml configuration file under the <resourceinit>-element. If this handler is removed from the configuration, the alias dialog is still available, alias definitions have no effect though.

In addition, aliases behave in the following way:

  • for paths which actually exist in the VFS and for paths that start with /system/ the alias resource handler is not being used
  • aliases are defined for a specific site; thus it is possible to use the same alias path in different sites
  • request parameters are not preserved for POST alias requests in combination with a redirect action