How to point two different domains to the same site

I have two domains

'' and ''

I want both of these to end up at the site ''
all of the content is there, but I'm not sure about the best way to go about this. In the past I've created a new site on the server and then on the index.html page I put a redirect in the header.

Is there a better way to do this though? Something where the domain registrar actually sends both directly to ''

Another thing to consider is that midsurgery is an old site that had content and I would like to preserve that google ranking while redirecting.

Thanks for any help
Who is Participating?
Ernie BeekConnect With a Mentor ExpertCommented:
The easiest way is to create a CNAME record in DNS (for the domain and point that to and the same for the to Also that way, when you change the ip for your site for whatever reason the second will automatically follow.
Ask your provider to change the mx record of the website you want to re-direct
The best way is a 301 redirect.

Information found here:

The best way to redirect those pages is by using something called a "301 Redirect". What this 301 redirect does, is it blatantly redirects to a different page when it is triggered. What makes the 301 redirect the best? Not only does it accomplish your redirect - it does it safely. No having to worry about the search engines penalizing you for it
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.