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 have a client who has their main domain (x.com) through Network Solutions. They also have registered y.com and y.org, but this time through Media Temple (no hosting on either domain). What they're asking me to do is make http://y.{com,org} use the files at http://x.com/y. The hosting package on x.com is a VPS with full root access. I'm not sure where to start with this one. Any ideas?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

Point all DNS towards the x.com VPS (just copy the DNS-settings from x.com and change the domain). Then alter your config accordingly on the VPS.

You could catch all of the domains using Virtual Hosts in Apache, like that the same content would be served to all of them.

NameVirtualHost *:80

<VirtualHost *:80>
ServerName www.x.com
ServerAlias x.com *.x.com
DocumentRoot /www/whatever

<VirtualHost *:80>
ServerName www.y.com
ServerAlias y.com *.y.com
DocumentRoot /www/whatever

It is possible, but I wouldn't recommend it, google for one, does not like mirror-domains. You are better off making a redirect from y.{org,com} to x.com.

RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.y\.com$ [NC]
RewriteRule ^(.*)$ http://www.x.com/$1 [R=301,L]
share|improve this answer

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.