Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Is it possible to redirect domain names which already point to the same server?

For example, if my main website is, and I have another domainname as, if I go to, I don't want users to see that domainname, I want them to be redirected to, even though they both are the same website.

I am using RedHat linux and have a LAMP configuration.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Sure, you can do it like this:

<VirtualHost *:80>
Redirect permanent /
share|improve this answer
Do I need to restart apache after making this change? – oshirowanen Apr 5 '11 at 9:15
Yes, I had to restart apache, but the script above puts the website into an infinite loop. – oshirowanen Apr 5 '11 at 9:26
What does your access log say is happening? – BillThor Apr 5 '11 at 13:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.