+

Search Tips   |   Advanced Search

Add HTML meta tags for Search Engine Optimization

A technique of SEO is to add HTML title and meta tags to the page source. These meta tags are used to define keywords and other metadata that search engines and crawlers can use when creating search indexes and collections. When including content in a page with a web content viewer, we can improve the SEO of the page by adding title and meta tags with values derived from the web content itself.

By default, the HTML title for a page is defined by the page title in the portal. However, when we add a web content viewer to a page to render web content, we can override the value used for the HTML title. Web content viewers that are configured to override the HTML title can also add HTML meta tags as portlet preferences.

With the Page Display Title field in the portlet settings for the viewer, we can define an HTML title that better reflects the content on the page. We can even have the viewer pull the title directly from the rendered content.

Although multiple web content viewers on the same page can set meta tag values, this practice does not necessarily result in improved SEO. This issue can be further complicated when multiple viewers set different values for the same meta tag name. When you have multiple viewers on the same page, select the viewer whose content best represents what the page is about. We can then use that viewer to define a new HTML title and any meta tags.


Override the HTML title for a page and set meta tags

  1. Select one Web Content Viewer to be the primary viewer on the page.

  2. Go to:

      Edit Shared Settings | Page Display Title

  3. Select a value other than Use default title.

    To have the title value come directly from the web content being rendered by the viewer, select...

      Select from content

  4. Save the changes

The page header is updated with the new title value. For example:


Use portlet preferences to add meta tags to page header

Each meta tag is defined by a pair of portlet preferences:

...where suffix identifies the name of the meta tag. For example...

To define a specific attribute for the meta tag:

The suffix portion of each preference is used to associate a name preference with its related value preference. The suffix can be any value as long as it is unique across the preferences.


Add portlet preferences to a Web Content Viewer

To specify the portal preference for the name of the meta tag.

To specify an attribute other than the name attribute:

For example, to add the following meta tag with the name keywords:

...specify the following preference:

To add the following meta tag with the http-equiv attribute:

...specify the following preference...


Specify the portal preference for the value of the meta tag

The value of the meta tag can be specified in three ways:

Depending on how to specify the meta tag value, different portlet preferences are required. Only one value can be specified per suffix.

For several of the most common meta tags, default values are predefined. For these meta tags, we can create the portlet preference for only the meta tag name. The meta tag value is provided automatically, without the need for a corresponding name preference. The following meta tags have default values:

If you do not want to use the default value, we can set the value using one of the methods previously described.

  • Optional: If the value of the meta tag requires a scheme attribute, specify the scheme attribute with the meta.tag.scheme.suffix preference. The meta tag scheme attribute takes the following format:

      meta.tag.scheme.suffix=attribute_value

    For example, to add the following scheme attribute with the value W3CDTF:

      <meta name="DC.date" content="2000-01-01T12:00+00:00" scheme="W3CDTF"/>

    Specify the following preference:

      meta.tag.scheme.1=W3CDTF

    The format and scheme that are used to write date elements and content properties related to date and time information, such as the LastModifiedDate property, depends on the meta tag attribute name. By default, all date and time information is formatted according to the date format defined by the HTTP specification. The format used to write date and time information in other meta tags is the data and time format recommended by the World Wide Web Consortium (W3C) under the scheme named W3CDTF.


    Examples

    The following examples demonstrate the different ways of specifying portlet preferences and the resulting meta tags in the output.

    • Set the meta tag value with the user who created the rendered content:

        meta.tag.name.1=DC.creator
        meta.tag.content.property.1=Creator

      Result:

        <meta name=”DC.creator” content=”content admin”/>

    • Set the meta tag value with preset text:

        meta.tag.name.1=DC.publisher
        meta.tag.content.text.1=IBM

      Result:

        <meta name=”DC.publisher” content=”IBM”/>

    • Set multiple meta tag values with the default value for the author and the value of the text element descelement in the rendered content:

        meta.tag.name.1=author
        meta.tag.name.2=description
        meta.tag.content.element.2=descelement

      Result:

        <meta name=”author” content=”content author”/>
        <meta name=”description” content=”Information about IBM”/>

    • Set the meta tag with an http-equiv attribute and a value of the date that the rendered content was last modified.

        meta.tag.name.1=last-modified
        meta.tag.attribute.1=http-equiv
        meta.tag.content.property.1=LastModifiedDate

      Result:

        <meta http-equiv=”last-modified” content=”Mon, 01 Aug 2011 13:45:57 GMT”/>

    • Set the meta tag and with a scheme attribute and a value of the date that the rendered content was published.

        meta.tag.name.1=DC.date
        meta.tag.scheme.1=W3CDTF
        meta.tag.content.property.1=PublishDate

      Result:

        <meta name=”DC.date” content=”2011-08-01T08:15:30+02:00” scheme="W3CDTF"/>


    Parent: Customize web content delivery