Addon domain is redirected to a folder under primary domain on bluehost

Published August 1, 2013 11:44 am

I had purchased the blue hosting couple of months back and had plan to host multiple site under the hosting plan. Recently, I bought another domain and tried to host it under the same hosting account.

bluehost cpl hand holds to assign the addon domain. but after doing everything, visit to website-2 was getting redirected to the primary domain like this. That is www.website2.com was getting redirected to www.website1.com/website2. After going through bunch of articles, that included this at bluehost forum, I could not find a solution to this. At one point, I even thought whether to just purchase another hosting plan for website-2.

Since few mentions in the thread above – pointed towards issue with htaccess, I started reading about url rewrite and htaccess documention at apache website. The documentation was helpful. After few trial and errors – I found that the few rules added earlier for redirecting root domain (of website1) to it’s www subdomain – was the root cause for this. They were like this:

 

 
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.example.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301]

After removing these two rules, this issue got resolved. There was one more hitch – browser cache kept the browser getting redirected even after this fix. Hence, I have to try it another browser to see that it was working.

With that, I got the addon domain working along with primary domain – using the same blue hosting account. Did you face the same issue?

Leave a comment