Add SEO information to Service Portal pages

Improve the searchability of Service Portal pages by adding meta tags and descriptive titles.

You can add SEO information to Service Portal pages by:

  • Associating public pages with meta tags to optimize search from external search engines.
  • Using record data loaded in a page to dynamically generate descriptive page titles and meta tags.

Dynamic meta tags and titles

Some pages in the Service Portal load record data based on a URL parameter. You can add meta tags and page titles that vary depending on the record loaded in the page.

Using Service Catalog as an example, the following URL includes a sys_id parameter in addition to the page ID. Different content is loaded depending on the value of the sys_id parameter.

https://<yourInstance>.service-now.com/sp?id=sc_cat_item&sys_id=060f3afa3731300054b6a3549dbe5d3e

If a page loads dynamic content, you can:

  • Add meta tags to the page.
  • Add meta tags that vary based on content.
  • Add variables that generate descriptive page titles based on content.
  • Add dynamic content to a page title.
  • Create targeted page titles for use with a screen reader.

For example, you can set a Service Catalog page to generate a dynamic title and meta tag based on record data associated with the sys_id in the URL parameter.

Dynamic page title based on catalog item sys_id.

Add meta tags to a public page

Improve the searchability of Service Portal pages by adding meta tags. You can add the meta name and description attributes to a page, define the robots attribute, or create dynamic meta tags for pages that load record data based on a URL parameter.

Before you begin

Role required: admin or sp_admin

Procedure

  1. Navigate to Service Portal > Pages.
  2. Open a page.
  3. Check that Public is selected. Pages that are not public are not indexed by external search engines.
  4. Click the Meta tags related list tab.
  5. Click New to create a new meta tag.
  6. Complete the form.
    Field Description
    Page Page to apply the meta tag to.
    Application Application scope of the page. This value is read-only.
    Name The HTML meta name attribute.

    To define the meta robots attribute, add ROBOTS.

    Content The HTML meta description attribute.

    If ROBOTS is defined in the Name field, you can add one of the following content values:

    • INDEX, FOLLOW: The search engine shows the page in search results and trusts any links in the page. This is the default value.
    • NOINDEX, FOLLOW: The search engine does not show the page in search results, but trusts any links in the page.
    • INDEX, NOFOLLOW: The search engine shows the page in the search results, but does not trust links in the page.
    • NOINDEX, NOFOLLOW: The search engine does not show the page in search results and does not trust links in the page.

    Alternatively, you can pass a variable into this field based on record data. For example, you can define a %description variable in this field, and create a content variable to populate the content tag with record data.

    A competed meta tag form for the sc_home page.
  7. Click Submit.
    The meta information is added to the page header. For example:
    <meta name="description" content="Order something from the Service Catalog">
  8. (Optional) Create a content variable to populate the content tag with record data.
    If the page loads record data based on one or more URL parameters, you can add meta tags generated from the record data.
    1. Open a meta tag record and check that the Content field contains a variable, or add a variable.
      Depending on the available URL parameters and the meta tag you would like to define, you can add the following types of values:
      Value types Description Example value
      One URL parameter variable Populates the content tag with the value defined in the associated content variables record. %description
      More than one URL parameter variable Populates the content tag with the values defined in the associated content variables records. %description %price
      Static value and a URL parameter variable Populates the content tag with a static value and the associated content variables record. Catalog item: %description
    2. In the Content variables related list, click New.
      The Content variables related list is only available after saving the meta tag record.
    3. Complete the form.
      Associate a field with a URL query parameter. When the value of the query parameter is used to display content, a field from the same record is used to generate the content tag. You can define the field to generate the content tag through the Table field field.
      Field Description
      Name The variable to store the value. Must begin with % and cannot contain spaces. This value must match one of the variables defined in the Content field in the Meta tag record.
      Application Application scope of the page. This value is read-only.
      Metatag The meta tag to apply the dynamic variable to.
      URL query parameter The URL parameter that determines the record to display.
      Table The source table of the URL query parameter record.
      Table field Select a field from the table defined in the Table field. This field is used to generate the value of the content tag.

      If more than one content variables match a variable defined in the Content field of the meta tag record, the record with the earliest Created date is used.

    4. Click Submit.

      A competed content variable form that populates the description tag with the value of a sys_id parameter.

    The content tag loads record data. For example:
    <meta name="description" content="Apple iPad 3">

Add dynamic titles to a page

Create variables to generate descriptive titles depending on the content loaded into a page.

Before you begin

Role required: admin

Procedure

  1. Navigate to Service Portal > Pages.
  2. Open a page.
  3. Add one or more variables to the Dynamic page title field.
    Depending on the available URL parameters and the dynamic title you would like to define, you can add the following types of values:
    Value types Description Example value
    One URL parameter variable Generates a page title using the associated record of one URL parameter. %question
    More than one URL parameter variable Generates a page title using the associated records of multiple URL parameters. %question %author
    Static value and a URL parameter variable Generates a page title using a static value and the associated record of a URL parameter. Q&A: %question
  4. Click the Dynamic page title variables related list tab.
  5. Click New to create a new variable.
  6. Complete the form.
    Associate a field with a URL query parameter. When the value of the query parameter is used to display content, a field from the same record is used to generate the title. You can define the field to generate the title through the Table field field.
    Field Description
    Name The variable to store the value. Must begin with % and cannot contain spaces. This value must match one of the variables defined in the Dynamic page title field.
    Application Application scope of the page. This value is read-only.
    Page The page to apply the dynamic variable to.
    URL query parameter The URL parameter that determines the record to display.
    Table The source table of the URL query parameter record.
    Table field Select a field from the table defined in the Table field. This field is used to generate the dynamic page title.

    If more than one dynamic page variables match a variable defined in the Dynamic page title field, the record with the earliest Created date is used.

    A competed dynamic page title variables form that populates the page title with a record sys_id.

    In this example, the value of the Question field in the Social Q&A Question table populates the page title. The %question variable must also be defined in the Dynamic page title field in the page record.

  7. Click Submit.

Result

When the page loads, the record defined in the URL query parameter displays. The field defined in Table field determines the title of the page.