canonical Returns the canonical URL for the page. Installation $ npm install @segment/canonical Example <html> <head> <link rel="canonical" href="http://example.com" /> </head> </html> var canonical = require('canonical'); canonical(); // http://example.com