Add meta tags to a public page
- UpdatedFeb 1, 2024
- 4 minutes to read
- Washington DC
- Service Portal Designer
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
- Navigate to All > Service Portal > Pages.
- Open a page.
-
Check that Public is selected.
Pages that are not public are not indexed by external search engines.
- Click the Meta tags related list tab.
- Click New to create a new meta tag.
-
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. -
Click Submit.
The meta information is added to the page header. For example:
<meta name="description" content="Order something from the Service Catalog">
- (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.
-
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
-
In the Content variables related list, click
New.
The Content variables related list is only available after saving the meta tag record.
-
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 URL parameter to indicate the record that is being displayed. You can enter any string. Tip: To create a URL parameter that is meaningful and easily identifiable, use a field name from the record. For example, to refer to a knowledge article, you can enter number to reference the article by its number.Relevant table column Table field to match the URL query parameter. For example, if you entered number to reference a knowledge article by its number, select Number. If left blank, the system uses the record sys_id. 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. Important: To support SEO, ensure that the referenced table field is public. For more information on granting access to a table field, see Create an ACL rule.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.
-
Click Submit.
The content tag loads record data. For example:<meta name="description" content="Apple iPad 3">
-
Open a meta tag record and check that the
Content field contains a variable, or add a
variable.
Related Content
- Create and edit a page using the Service Portal Designer
Create or edit a page and use layouts to organize the columns that house the widgets.