Add human readable keywords to the URLs of portal pages to improve search engine optimization (SEO) and click-through rates and help users understand what to expect on the page.

Before you begin

Role required: sp_admin or admin

About this task

Human readable keywords are added to URLs in the following format:

https://<instance>/<portal suffix>/<guest language>/<keywords>?id=<page id>&<page parameters>

Keywords can be populated using static content or dynamic page variables and can include a single slash (/). Dynamic page variables load keywords that are based on data in a record. The page parameters in the URL specify which record to use. In the following examples, the category and short description of a knowledge article and the category and name of a catalog item are added as keywords:

  • https://<instance>/kb/en/faq/what-is-a-cookie?id=kb_article_view&sysparm_article=KB0000007
  • https://<instance>/sp/es/hardware/developer-laptop-mac?id=sc_cat_item&sys_id=774906834fbb4200086eeed18110c737
Note: To turn off human readable URLs for an instance, add the glide.service_portal.enable_human_readable_urls property to the System Properties [sys_properties] table and set the value to false.

Procedure

  1. Navigate to All > Service Portal > Pages.
  2. Select a page.
  3. (Optional) Use keywords that are dynamic based on the page content by adding a dynamic page variable to the page.
    1. Select the Dynamic page variables related list tab.
    2. Select New.
    3. On the form, fill in the fields.

      This example shows the values for a variable that references the short description of a knowledge base article identified by its number for a published workflow.

  4. Select Submit.
  5. In the Human readable url structure field of the page record, specify the keywords to populate in the page URL using static content, dynamic page variables, or a combination.

    Keywords can include alphanumeric characters, hyphens (‐), one slash (/), and percent signs (%) for variables.

    Human readable url structure Example value
    Static content faq/what-is-a-cookie
    Dynamic page variables %category/%short_descr
    Static content and dynamic page variable faq/%short_descr

    Keywords are automatically formatted to use only lowercase letters, replace spaces with hyphens, and remove any disallowed special characters added by dynamic page variables. If the keywords in the URL exceed 75 characters, they’re truncated to be less than or equal to 75 characters.

  6. Select Update.

Result

If users access the page using the URL without human readable keywords, the page URL is updated in one of the following ways:

  • On the initial page load by a guest user, the page redirects to the human readable URL.
  • On the initial page load by an authenticated user, the URL is updated to include the human readable keywords without redirection.
  • On subsequent page loads for all users, the URL is updated to include the human readable keywords without redirection.

Example: Knowledge article page with human readable keywords in the URL

In this example, the kb_article_view page displays knowledge article KB0000007. The knowledge article record has the following fields and values:

  • Category is FAQ
  • Short description is What is a cookie?

The page has been configured to add keywords based on these field values to the URL using dynamic page variables such as %category/%short_descr. The question mark in the short description isn’t an allowed character in the URL keywords so it’s automatically removed from the URL. The question mark that is in the URL is the query parameter that's always included before the page ID.

The URL that is displayed in the browser appears as: http://<instance>.com/kb/en/faq/what-is-a-cookie?id=kb_article_view&sysparm_article=KB0000007.

What to do next

For pages that have canonical URLs, you must include the human readable keywords in the canonical URL. In the SEO script include that returns canonical URLs for pages, use one of the getHumanReadableUrl methods in the SPSEOUtilsSNC class to return the human readable keywords in page URLs and include them in the canonical URLs.

For more information about including human readable keywords in canonical URLs, refer to the following resources: