{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":42406,"path":"platform-user-interface/service-portal/add-human-readable-keywords-page-urls.md","title":"Add human readable keywords to page URLs","bundle":null,"doc_type":null,"release":"australia","body":"\n# Add human readable keywords to page URLs\n\nAdd 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.\n\n## Before you begin\n\nRole required: sp\\_admin or admin\n\n## About this task\n\nHuman readable keywords are added to URLs in the following format:\n\n`https://<instance>/<portal suffix>/<guest language>/<keywords>?id=<page id>&<page parameters>`\n\nKeywords 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:\n\n-   `https://<instance>/kb/en/faq/what-is-a-cookie?id=kb_article_view&sysparm_article=KB0000007`\n-   `https://<instance>/sp/es/hardware/developer-laptop-mac?id=sc_cat_item&sys_id=774906834fbb4200086eeed18110c737`\n\n**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`.\n\n## Procedure\n\n1.  Navigate to **All** &gt; **Service Portal** &gt; **Pages**.\n\n2.  Select a page.\n\n3.  Use keywords that are dynamic based on the page content by adding a dynamic page variable to the page.\n\n    1.  Select the Dynamic page variables related list tab.\n\n    2.  Select **New**.\n\n    3.  On the form, fill in the fields.\n\n        |Field|Description|\n        |-----|-----------|\n        |Name|The variable that loads keywords in the page URL from record data. The variable name must begin with `%` and can’t contain spaces. For example, `%short_descr`.|\n        |Order|The priority order from lowest to highest for when multiple dynamic page variables with the same name have different URL query parameters.|\n        |Page|The page that uses the dynamic page variable to include keywords in the URL.|\n        |URL query parameter|The parameter in the page URL that determines which record displays.|\n        |Relevant table column|The column in the specified table that includes the values of the URL query parameter. The default value is **Sys ID**.|\n        |Table|The table that includes the records used to populate keywords in the URL and the column with the values of the URL query parameter.|\n        |Table field|A field from records in the specified table that populates the keywords in the URL.|\n        |Query condition|Conditions that filter the records in the table. A record must meet the query conditions for the variable to apply.|\n\n        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.\n\n        |Field|Value|\n        |-----|-----|\n        |Name|%short\\_descr|\n        |Page|kb\\_article\\_view|\n        |Order|100|\n        |URL query parameter|sysparm\\_article|\n        |Relevant table column|Number|\n        |Table|Knowledge\\[kb\\_knowledge\\]|\n        |Table field|Short description|\n        |Query condition|\\[Workflow\\]\\[is\\]\\[Published\\]|\n\n4.  Select **Submit**.\n\n5.  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.\n\n    Keywords can include alphanumeric characters, hyphens \\(‐\\), one slash \\(/\\), and percent signs \\(%\\) for variables.\n\n    |Human readable url structure|Example value|\n    |----------------------------|-------------|\n    |Static content|`faq/what-is-a-cookie`|\n    |Dynamic page variables|`%category/%short_descr`|\n    |Static content and dynamic page variable|`faq/%short_descr`|\n\n    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.\n\n6.  Select **Update**.\n\n\n## Result\n\nIf users access the page using the URL without human readable keywords, the page URL is updated in one of the following ways:\n\n-   On the initial page load by a guest user, the page redirects to the human readable URL.\n-   On the initial page load by an authenticated user, the URL is updated to include the human readable keywords without redirection.\n-   On subsequent page loads for all users, the URL is updated to include the human readable keywords without redirection.\n\n## Knowledge article page with human readable keywords in the URL\n\nIn this example, the kb\\_article\\_view page displays knowledge article KB0000007. The knowledge article record has the following fields and values:\n\n-   **Category** is **FAQ**\n-   **Short description** is `What is a cookie?`\n\nThe 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.\n\nThe 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`.\n\n## What to do next\n\nFor 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.\n\nFor more information about including human readable keywords in canonical URLs, refer to the following resources:\n\n-   Configure custom SEO tags for canonical URLs and localized knowledge articles\n-   SPSEOUtilsSNC - Global\n\n**Parent Topic:**[Improving search engine optimization for portals](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/platform-user-interface/service-portal/seo-sp.md)\n\n**Related topics**  \n\n\n[Create and edit a page using the Service Portal Designer]()\n\n[Page navigation in Service Portal by URL]()\n\n"}}