Connect multiple domain names to the same hosting ?

This done on VPS with godaddy, this may different with your put still the steps is the same 

Go to the domain dashboard panel first, you have to create an `A` record in the domain pointing to the ip address

domainname     A       ipaddress

Incase of VPS  :

  • You have to make a new alias for this domain after making the record in the domain dashboard
  • Go to ( /etc/httpd/conf/httpd.conf ), this is the path for my centos VPS you may be different
  • Search for the domain name ( original domain name ), CTRL+W   then type domain name ( i opened the file with nano offcourse )
  • inline ServerAlias –> create a new line below it with ( ServerAlias newdomain.com )

Important Notes : 

  • To get the httpd.conf you have two go either of the following paths (  /usr/local/apache/conf/httpd.conf ) or ( /etc/httpd/conf/httpd.conf ) 
  • Just copy a backup for the ( httpd.conf ) before missing with the original one
  • If you missed with the ( httpd.conf ) and want to rebuild it again just run ( /scripts/rebuildhttpdconf )
  • To restart apache ( service httpd restart ) and make sure the you are a root user ( su – )

 

Incase of Shared Hosting : 

you can use ADD ON DOMAIN in the cpanel to do that, or ask the hosting to add this domains for you in the apache config file

 

Advertisements
Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: