Author Topic: multiple domains pointed to one location  (Read 2632 times)

ober

  • Ashton Shagger
  • Ass Wipe
  • Posts: 14310
  • Karma: +73/-790
  • mini-ober is taking over
    • Windy Hill Web Solutions
multiple domains pointed to one location
« on: January 13, 2007, 07:44:20 PM »
Ok, so I think i know the answer to this, but I have my personal site, right?  I want to change the name/address of my company, but I want to keep the old address for a period until I get everthing updated.   If I just point both of them at the same nameserver... how will that work?  I THINK that whatever address you use you will keep... so I guess what I should do is just forward the old one to the new one... yes?

webwhy

  • Jackass IV
  • Posts: 608
  • Karma: +15/-10
Re: multiple domains pointed to one location
« Reply #1 on: January 13, 2007, 09:07:45 PM »
Two DNS entries:

a) www.domain1.com
b) www.domain2.com

both domains are configured as entries in your name server with A records that point to the same IP address 10.10.10.1.  you have a web server that claims that IP address.  The web server needs to be configured to respond to requests for both hosts.  They're several ways to do this depending on the web server software you're using.  Then you can redirect to the principle domain on requests for the second domain using either the web server configuration or code.  So requests for www.domain2.com redirect to www.domain1.com, etc...

You're right though...it's a good idea to run the website under one domain and redirect all requests for secondary domains to the main web domain.  It makes things like cookie and session tracking much simpler.