homepage Welcome to WebmasterWorld Guest from 54.163.72.86
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Hardware and OS Related Technologies / Website Technology Issues
Forum Library, Charter, Moderators: phranque

Website Technology Issues Forum

    
Have two domains point to a single site
What are my options?
wesg




msg:3563460
 2:48 am on Feb 1, 2008 (gmt 0)

I am in the process of setting up a website for a client, who has purchased two domain names for their website. What are my options to link them together to a single site?

I have read about 301 permanent redirects via .htaccess so that's not really the problem.

Do I need to purchase two separate web hosting services, or can it be done with one package? (ie. if I have space on server A for the main site, do I need server B to contain that single .htaccess file or can I set it up with server A).

Thanks for the help, this forum is a great place for answers.

 

kbell




msg:3563505
 4:33 am on Feb 1, 2008 (gmt 0)

Just set up domain B as CNAME of domain A and use one host.

coopster




msg:3564154
 6:26 pm on Feb 1, 2008 (gmt 0)

301 permanent redirects

Just don't forget to incorporate that part!

jtara




msg:3564229
 7:50 pm on Feb 1, 2008 (gmt 0)

Just set up domain B as CNAME of domain A and use one host.

Not QUITE so simple, but almost so.

You will need to make sure that your hosting plan allows for multiple domains and virtual hosts. Most do, nowadays, at least for 2-3 domains.

With a VPS or dedicated server, of course, generally no problem. You may have to pay for extra IP addresses if you prefer that the sites have seperate IPs, but that wouldn't normally be the case if you are just redirecting and not hosting separate content.

If your host doesn't support this, you have other options. Registrars and third-party DNS providers often offer "forwarding" service, which is often mislabeled as a "DNS" feature. It isn't. They run a web server that does a 301 redirect to your main site. You point the secondary site to their server, and it does the redirects.

Finally, how do you want the URL bar in the browser to read after the user has navigated to the site?

That is, you have:

example2.com -> example.com

If somebody types in [example2.com,...] when they arrive on your site, do you want the URL to read example2 or example?

If you want it to read example2, then you need to set up a virtual host, and just point it to the same content directory on the server. You will also have to make sure all your links in your pages are relative, not absolute.

wesg




msg:3564904
 8:11 pm on Feb 2, 2008 (gmt 0)

I think the only reason is to have people come to the page when they mistype the address. Who knows, maybe they can get by with one domain.

Durham_e




msg:3567977
 8:31 pm on Feb 6, 2008 (gmt 0)

"You will also have to make sure all your links in your pages are relative, not absolute"

Good point Jtara, thanks for such a excellent post to such a common question that has todate for me, never really been fully answered.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Website Technology Issues
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved