Document Properties
Kbid29436Q
Last Modified22-Apr-2020
Added to KB18-Jun-2020
Public AccessEveryone
StatusOnline
Doc TypeGuidelines, Concepts & Cookbooks
ProductIntershop Progressive Web App

Concept - Intershop Progressive Web App - Search Engine Optimization (SEO)

Search Engine Optimization (SEO)

This concept documents our approach for search engine optimization for the Intershop Progressive Web App.

Server Side Rendering

The PWA uses Universal for pre-rendering complete pages to tackle SEO concerns.
An Angular application without Universal support will not respond to web crawlers with complete indexable page responses.

Angular's state transfer mechanism is used to transfer properties to the client side.
We use it to de-hydrate the ngrx state in the server application and re-hydrate it on the client side.
See Using TransferState API in an Angular v5 Universal App for specifics.

Follow the steps in Guide - Getting Started to build and run the application in Universal mode.

Official documentation for Angular Universal can be found at https://angular.io/guide/universal.

robots.txt

We use the library express-robots-txt in the express.js server (server.ts in the project root) to supply a response to robots.txt for crawlers.

By default the universal server provides a response with access to all pages except some restricted paths (e.g. /error or /account).
To use a custom robots.txt, place it as a file in the dist folder.

Page Metadata

The PWA uses the library @ngx-meta/core for setting tags for title, meta description, robots, canonical links and open graph infos in page headers.
It is also possible to use translation keys here.

The process is triggered by adding the guard MetaGuard to the routing.
This is automatically done for all routes in the SEO module.
The default MetaSettings are also configured in this guard.

seo.effects.ts is the central place for customizations concerning dynamic content, e.g. names of products or categories (asynchronous data from the API).
Effects are an essential part of our State Management.

Disclaimer

The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.

Customer Support
Knowledge Base
Product Resources
Support Tickets