Another option for dealing with duplicate content is to utilize the rel=canonical tag. The rel=canonical tag passes the same amount of link juice (ranking power) as a 301 redirect, and often takes much less development time to implement. The tag is part of the HTML head of a web page.
The rel=canonical element, often called the “canonical link”, is an HTML element that helps webmasters prevent duplicate content issues. It does this by specifying the “canonical”, or “preferred”, version of a web page.
If you can implement 301 redirect, you should do it, I think its better way.
Otherwise you can use canonical tag on pages if you have any technical difficulty to implement 301 redirect.
A canonical link element is an HTML element that helps webmasters prevent duplicate content issues by specifying the "canonical" or "preferred" version of a web page as part of search engine optimization.
Canonical tags can be a challenging concept to understand, but it's essential to creating an optimized website. The fundamental problems that canonicalization can fix stem from multiple uses for a single piece of writing–a paragraph or, more often, an entire page of content–that appears in multiple locations on one website or on multiple websites.
A canonical link element is an HTML element that helps webmasters prevent duplicate content issues by specifying the "canonical" or "preferred" version of a web page as part of search engine optimization.
A canonical connection component is a HTML component that helps website admins anticipate copy content issues by indicating the "canonical " or "favored" form of a site page as a feature of site improvement.