Welcome to WebmasterWorld Guest from 22.214.171.124
Forum Moderators: phranque
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.
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.