Leveraging Liferay Platform for SEO

Avakash Dekavadiya

In digital era, Search Engine Optimization (SEO) plays an important role in optimizing specific web pages or complete website. This makes the website pages and its content search engine friendly and scores higher in search results.

Meta tags, page title and sitemap are important aspects of SEO that can be configured for web pages of Liferay  sites from control panel. In Liferay, administrator can configure meta tags, title tag in different languages for public and/or private pages.

SEO panel for web pages for Liferay 6.2 and 7 are shown below respectively:

Liferay 7.0.1 SEO section

Configuration of SEO fields like title of page, meta tags are shown in images below:

Liferay 6.2.2 Html title

Liferay 7.0.2 Html title

Liferay 6.2.3 Meta tags

Liferay 7.0.3 Meta tags

We can customize sitemap related things like whether we want to include a particular public page in the sitemap or not, Priority of public page and change frequency of public page. Fields related to sitemap are shown in below image  Liferay 6.2.4  Site Map and  Liferay 7.0.4 Site Map for Liferay 6.2 and Liferay 7 respectively.

Liferay 6.2.4 Site Map

Liferay 7.0.4 Site Map

As sitemap properties can be customized, sitemap can be submitted to google and yahoo for indexing of pages of website. Liferay uses Sitemap protocol to notify google or yahoo about sitemap. Administrator can see and submit sitemap to search engines under Site Settings for Liferay site as shown below:

Liferay 6.2.5 sitemap submit

Liferay 7.0.5 sitemap submit

To prevent search engine crawler to access certain website parts, administrator can use robots.txt files at the root of the site.For example http:// www.example.com/robots.txt. In Liferay, configure values for robots.txt file in Robots section of Site Settings. Screenshot below shows the Robot section of Site Settings: .

Liferay 6.2.6 robot txt

Liferay 7.0.6 SEO section

Liferay content Management for SEO

WYSIWYG is a HTML editor that allows you to modify fonts, add color, insert images and much more. For SEO and user-friendliness, formatting content is important like using proper header, alt and title attribute of images etc. Structured data also plays vital role towards rich snippets in the search result. You can find attributes to add in HTML elements at https://schema.org for structured data.Liferay provides WYSIWYG as default editor UI for web content and blog portlet.

WYSIWYG is a rich editor that allows to format content. Administrator can  add different headers like h1 to h6, attributes like alt and title for images and more. Administrator can also view source and add html elements with all important attribute for structured data.

Liferay 6.2.7 WYSIWYG editor

Displaying same web content on more than one page with two different URL is not favorable for SEO. In such case, one default display page can be used. Here, a visitor from the different page with the same content will be redirected to default display page. In this case, one canonical URL is created that will refer same content.

There are two ways to create display page:

Use content display page template while creating page of liferay site.

Create display page manually by adding asset publisher portlet on page and checking the checkbox labeled  Set as the Default Asset Publisher for this page and select View in Context for Asset link ehavior under Display Setting tab while configuring asset publisher portlet.

To see how it works,

When user clicks on View More it will redirect user to canonical url created by Liferay for same web content .

Liferay takes abstract/description as meta description and tags as meta keywords. It adds this description and keywords along with configured meta description and keywords for specific page. To add meta description and keywords to the content (web content, blog, contract etc) just provide description/abstracts and tag for categorization as shown in image below:

Liferay 6.2.8 Web content abstract

Liferay 6.2.9 Web content categorization

Liferay 6.2.10 Meta tags in HTML

Liferay uses portlet URLs that contains many request parameters and we can also add more request parameters. So URL becomes too long and it is not good for SEO.

Liferay provides the way to shorten URLs and these URLs are called friendly URLs.

p_p_id: current portlet id

p_p_state: window state (normal, maximized, minimized)

p_p_mode: portlet mode (view, edit and help)

p_p_lifecycle: this is life cycle of portlet 0/1/2

0: render phase or render URL

1: action phase or action URL

2: server resource URL

Steps to create friendly URL

Configure URL routes in xml file

Friendly URL Implementation Java class, we generally use Liferay’s implementation class DefaultFriendlyURLMapper

Configure the Friendly URL information in liferay-portlet.xml file.

With digitization, businesses are focusing on SEO to build up their online footprints. Liferay offers the benefit of being SEO-ready platform for websites. With an easy-to-use GUI, website teams can accelerate their execution pace. Marketing teams with little hands-on-training can also independently work on SEO activities for the website.

AIMDek with its Liferay expertise, offers an array of services for Liferay ranging from strategy consulting, execution, maintenance, et al. To know more about our Liferay capabilities, mail us on sales@aimdek.com

Integrating Slack Webhooks for Collaboration
Digital Insurance - The future of insurance carrier

TALK TO OUR SUBJECT MATTER EXPERT