One website: two domains - how to avoid duplicate content?
I'm working with a client who currently has two domains. Instead of just redirecting domain A to domain B, the whole site has been duplicated. Not sure why their previous web developer set it up this way as it seems like a messy way of setting things up: SEOgets diluted and two sites need to be maintained. What would be the benefits?
Anyway, I am building a new site for my client and simply want to redirect domain B to domain A. The site only exists at domain A. I can easily set this up, however I'm concerned that all the domain B pages that have been indexed by Google will now return 404 errors.
Is there a way to redirect all the domain B pages to domain A? Do I simply do this on the hosting company's cPanel OR do I need to set up a rewrite file of some sort?