How to create short URLs

Pages in TYPO3 are initially given a web address (hereafter URL) based on their position in the page tree. All levels in the page tree contribute to the overall address. This helps users understand where they are within the structure. However, a page that is several levels down from the homepage can end up with a very long and unwieldy URL.

You can create a shorter URL for both pages and files. This is done by creating a so-called short URL ("pretty URL"). For example, you can use it on posters or printed business cards.

There are two methods for creating short URLs, each with different advantages and disadvantages, as described below.

Create shortcuts in a folder

Create a folder for your shortcuts

If there isn’t already a folder on your domain named 'References' or 'Shortcuts,' you can create one to store your short URLs. Here’s how:

Ensure you’re at the root (marked with a globe icon) in the page tree.

  1. Create a new page by clicking the icon to create a new page. Four options will then appear.
  2. Click on the folder icon and drag it to the desired location in the page tree, then drop it.
  3. Name the newly created folder (e.g., 'References').

Ensure the folder is visible. Finish by saving and closing.

Create shortcuts (the short URLs)

Now you can create short URLs in your shortcuts folder.

  1. Create a new page under the 'References' folder. If you want to link to an uploaded file or an external website, the page should be of the type 'Link to External URL'.
  2. If you want to link to another page within the site tree, the page should be of the type 'Shortcut'.

Remember: You can always undo your choice and change the page type by editing the page properties.


Links to external URL

  1. Give the shortcut/reference a title. The title will be visible in the menu and in the URL. For example: domainname.au.dk/smukurl.
  2. In the URL field, enter the URL of the page you want the shortcut to redirect to.
  3. Save and close.

Links to shortcuts

  1. Give the shortcut a page title. The title will be visible in the menu and in the URL. For example: domainname.au.dk/korturl
  2. In the 'Shortcut target' field, enter the page id of the page you want the shortcut to redirect to. You can also navigate through the page tree and select the page you want to create the shortcut for (in that case, click on the folder farthest to the right).
  3. Save and close. 

Change the page's URL to a short URL

Note: Renaming URLs is not without issues. Therefore, it is recommended to use this method only in exceptional cases. We recommend the method mentioned above for creating a shortcut.

It is possible to change a page's URL independently of its placement in the menu structure. For example, you can change the URL of a page several levels down in the menu structure so that it no longer reflects the page's location in the hierarchy. The procedure is as follows:

  1. Select the page for which you want to change the URL.
  2. Edit the page properties.

Under 'URL-segment', you can now set the page URL yourself:

  1. Click the button to open the URL field for editing.
  2. You can now enter the path you want the page to have – allowing you to create a short URL if desired.
  3. Save and close.

Be careful with URL changes!

Renaming URLs is not without challenges. It can be difficult for users to understand where a page belongs if its URL no longer reflects its position in the menu structure. Additionally, too many pages with special URLs can cause confusion.

The recommendation is to only change (shorten) a page's URL in special cases, and to do so as early as possible after the page is created. Renaming the URL of a page that was created several years ago can create issues with the URLs of its subpages.

We also caution against renaming the URL of the same page multiple times. Each time you rename a URL, TYPO3 creates a redirect from the old URL to the new one. This is useful because it directs traffic from the old page to the correct location, but too many redirects due to frequent renaming can cause the page to stop working, resulting in a 404 error. If you encounter this issue, contact your local TYPO3-support. They can delete the old redirects, so the page will be displayed again (404 error resolved).