Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm currently using the Linode DNS Manager but I'm failing to see where can I adjust that if the user goes to example.net, he's automatically redirected to example.com. I know apache does that and my Apache is already configured properly at ServerAlias example.net and ServerName example.com.

share|improve this question
add comment

2 Answers 2

If you want the user experience to see only example.com, rather than just having example.net work exactly like example.com, then setting up a separate virtual host in apache with a simple redirect rule that redirects everything is probably what you want. With ServerAliases you can make several different names (www.example.com, example.com, www.example.net, example.net) work the same way but with Redirect rule you can force everything into one name that you support.

share|improve this answer
add comment
<VirtualHost xxx.xxx.xxx.xxx:yyy>
ServerName xxx.net
RewriteEngine On
RewriteRule ^(.*)$ http://xxx.com$1 [L,R=301]
...
...
...
</VirtualHost>
share|improve this answer
    
@Dan thanks for the formatting help! –  MrTuttle Nov 1 '11 at 21:00
    
Thank you for this. Just a note about the formatting for others who seek this same answer, the correct code should have RewriteRule written together, like this: <VirtualHost xxx.xxx.xxx.xxx:yyy> ServerName xxx.net RewriteEngine On RewrituleRule ^(.*)$ http://xxx.com$1 [L,R=301] ... ... ... </VirtualHost> –  bsides Nov 3 '11 at 14:43
    
huh. that's a pretty egregious typo on my part. fixed. –  MrTuttle Nov 3 '11 at 21:47
add comment

Your Answer

 
discard

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.