Support / KnowledgeBase

 
Search the KnowledgeBase Search

Pointing Multiple Domains to the Same Alternate Domain Folder

  • Applies to: (gs), (ss)

  • Difficulty: Easy

  • Time needed: 5 minutes

  • Tools needed: SSH

 

Sometimes you want to simply point another domain to an alternate domain's folder. This article will show you how to do just that.

Example: You have mt-example.com as a primary and alt-example.com as an alternate. You want alt-example.com to serve the same content as mt-example.com.


DETAILS:

On (ss) Shared-Servers

1) Create a .htaccess file (if one doesn't exist) in the webroot (/var/www/html/) folder and add the following line to it:

Options +FollowSymLinks

Making sure to include the capitalization.

2) Log into your server via SSH (see our article (ss) Enabling SSH Access) and do a:

cd /var/www/html

 ln -s mt-example.com alt-example.com

and hit enter, this should create a symlink that points requests for alt-example.com to mt-example.com. If SSH hasn't been enabled on your account you can request it through the support request system.

On (gs) Grid-Services

1) Add the domains you'd like to use (alt-example.com in this example) as alternate domains in the AccountCenter.

2) Log into your (gs) via SSH, move into the domains directory and delete the folders for alt-example.com with these commands:

cd domains

rm -rf alt-example.com
If you need help enabling SSH for the 'serveradmin' user please follow our article Connecting via SSH to your (gs) Grid-Service.

3) Create a symlink named 'alt-example.com that points at the mt-example.com folder with this command:

ln -s mt-example.com alt-example.com

NOTES:

NOTES:


Revisions:

07-20-2009: Minor Fixes
 

User Comments

No visitor comments posted. Post a comment

Fields marked with an asterisk(*) are required. Comment on this article

Fill out the form below if you would like to comment on this article.
 
 
 

(code is not case-sensitive)
 
Submit
 
 

Continue