We help IT Professionals succeed at work.
Get Started

301 redirect replacing domain alias on Windows server

Naryan108
Naryan108 asked
on
498 Views
Last Modified: 2012-05-07
Ok, I'm a little confused.  I know there's some similar questions out there, but I just can't quite get to grips with it....

here goes:
asp classic site hosted on windows server.  Currently the website (which includes database, secure folders, etc) under hosted domain e.g. www.old-domain.com.  However, we promote and market a different domain (e.g. www.new-domain.com) that is set up in the control panel as a domain alias for the hosted domain.  It seems however, that this is not a very google-friendly way of doing things (www.old-domain.com shows up in search results, not www.new-domain.com) so I'm trying to administer a 301 redirect to solve this problem.

I understand that a few lines of code will do the trick.  Where on earth should I put it?
Will new-domain.com replace old-doman.com in the url address bar?
Should I then delete the domain alias in the control panel?

Help gratefully received.
Comment
Watch Question
This problem has been solved!
Unlock 1 Answer and 18 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE