Added method for encoded cannonical url

@phoenix24 : Can you please review this?