Topics Map > Documents Tab

KB User's Guide - Documents Tab - Custom URL Field

You may assign a custom URL for each new document based on its title. Using short, memorable URLs makes it easier for visitors to find and share your content. While the document title remains designed for display and human readability, its custom URL may be optimized for brevity or for consumption by search engines.

What Is a Custom URL?

A custom URL is provides a way to identify a document using descriptive text in the last part of a URL.

For background, a standard KB URL takes the format https://kb.wisc.edu/page.php?id=12345 or https://kb.wisc.edu/12345, where the document ID is the identifying part of the URL. A custom URL is a second, alternative URL that relates to the document content, where the page.php?id=##### is replaced by the specified text, e.g. https://kb.wisc.edu/custom-descriptive-text.

Custom URLs are typically generated from the document title, but they can also be further customized. In the event that a page title is too long or repetitive to use as-is, the custom URL may be shortened for brevity.

Creating a Custom URL

The Custom URL field is found on the document edit screen under the Additional Fields section (must be expanded to view).

The "Custom URL" field is located directly above the "JavaScript/CSS" field.

You can automatically generate a custom URL by clicking the Generate link—doing so will insert the title of the document, rendered in lower case with words separated by hyphens. You may then modify the generated text if desired.

Requirements

  • Must be between 3 and 200 characters
  • Only special character allowed is the dash (-)
    • Accented characters (e.g., "é") will be converted to the unaccented equivalent (e.g., "e")
    • Space(s) will be converted to dash(es)
    • Other special characters, like apostrophes, will be removed
  • Cannot solely use the word "internal" with no additional words
    • If the word "internal" is entered on its own, the document ID number will be automatically appended, e.g. "internal12345"

Other Considerations

  • Avoid using overly general custom URLs, especially if you are sharing documents with the Unified KB. See below for more information.

  • If you decide to change a previously-set custom URL, there is no way to set a redirect from the original custom URL to the new one. Users attempting to access the document via the old custom URL will get a "Page Not Found" error.

  • Any words you add to the custom URL that are not already in the Title field will automatically be added to the Keywords field upon saving.

Viewing a Custom URL

After you save your document, you will see the current custom URL in the document information table while viewing your doc in Document Review Mode while in the KB Admin Tools.

When viewing the document in the Live Site(s), you will see that the custom URL has been added as a hotlink. It is found in the Document Information Table at the bottom of the document.

In the image below, you will see the custom URL circled in red beneath the Sites field in the document information table of a live document:

Handling for Duplicate Custom URLs

Please note that uniqueness of custom URLs is not enforced, i.e., you are able to create a custom URL that is the same as that of another document.

In the event that two or more documents are published to the same site with matching custom URLs, users will be taken to a search results page showing all documents with that custom URL rather than seeing any one individual document.

Example

In this example, three documents were published to three individual subsites with the custom URL "training-document". This custom URL was unique within each of their subsites, however, they are all sharing into the Unified KB, so all three documents can be accessed at the URL https://kb.wisc.edu/training-document.

The image below shows the resulting page should a user have attempted to access this URL. The Search field shows the document IDs of three documents that have the same custom URL, and the page displays all three documents in the search results table.

Unified KB results when a non-unique cleanUrl is entered resulting in three different documents all with the same cleanurl

When the page loads, the URL displayed in the browser will change to list the three document ID numbers, e.g. https://kb.wisc.edu/search.php?q=12345,23456,34567.