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

I developed everything on the domain www.example.net. Now, I'd like to switch it so that the main site is on www.example.com.

What is the most proper way to forward all requests from the .net set to .com? This is a LAMP installation with Apache, Cpanel, and WHM.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

First, in CPanel set up a domain alias (The Addon Domains option), set the 'Document Root' to empty. That will map both example.com and example.net to the same place. Then create a .htaccess file with rewrite rules/conditions to 301 recirect example.net to example.com. That way all your old links will still work.

share|improve this answer
it won't let me add an alias... also now it's telling me that some files aren't found on the server, i'm completely lost now! ha –  Shackrock May 23 '11 at 1:38
If your package isn't set up to allow an addon domain you'll need to get in touch with the admin on your server so they can set it up for you. Otherwise you'll have to set up a new domain and add all the data, migrate all the databases and re-do all the settings again –  sam May 23 '11 at 1:39

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.