0

Hi,

I have three domains connected on my webhost. On first i have site, and names of other two domains associated with content on the site.

I want to redirect this domains to site, i heard that i can do from web hosting panel or with htaccess and etc.

What you sugest and how to do that? Maybe one day i will make specific sites on each domain individually, but when i collect enough material for each particular.

6
Contributors
5
Replies
6
Views
5 Years
Discussion Span
Last Post by willson1
0

Your description is not clear. You have three domains and where are they pointing to at this moment? do you want all three domains to point to the same website? If so, just go into the DNS management of each domain name and point it to the IP of the webserver that is hosting the website where you want the three domains to be "linked" to. Then on the website, you need to make sure that the web server is accepting traffic for all three domain names. For IIS you would modify the host headers. Not sure for Apache. If you are hosting this web site with a provider, their webiste management console will allow you to add the multiple domain names to the website.

Unless you need to perform a redirect from an old link, say domain1.com/somefolder/somefile.htm --> domain2.com/somefolder/somefile.htm, you do not need to modify the .htaccess or if your running IIS/Windows, URL Rewriting.

0

You are correct in thinking that this can be done from a 301 redirect in the .htaccess file, or through your hosting company or domain name registrar. I don't know who your hosting company or registrar is, so I can't help you there. You should be able to call up their technical support and ask them how to do it.

However, I can tell you how to do it through an .htaccess file. To force every domain to redirect to a particular domain (such as www.daniweb.com), put this in an .htaccess file in the root directory.

RewriteEngine on

# Force everyone to use www.daniweb.com
RewriteCond     %{HTTP_HOST}    !^www.daniweb.com$              [NC] 
RewriteRule     ^(.*)$      http://www.daniweb.com/$1       [R=301,L]
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.