Canonical tag for cms and other custom url in magento

Here, We will explain How to canonical tag for cms and other custom url in magento. It will helps you in Search engine optimization of magento store.

The code for remove trailing slash and put canonical url for cms and other custom url in magento for Search Engine Optimization purpose: