BlueHost, Add-On Domains, and .htaccess

Jan. 06

As mentioned in my 2010 goals, I’m extremely excited about the domaining industry. My 2010 goals have me attending at least one major domaining conference in addition to developing at least six websites. (Honestly, I’m sandbagging a bit and hope to develop quite a few more websites than six.) Domaining and web publishing in my opinion are excellent ways to master SEO while building up some passive income. (You may wish to read my article about moonlighting your way to success in your PPC career.)

In today’s article, I’d like to feature a low level discussion on hosting multiple domains within a single web hosting account, a cost effective method for anyone to develop multiple websites this year. Specifically, I will be sharing my BlueHost story. I hope to save you the many hours it took me to figure out configuration of the .htaccess file to optimize SEO for add-on domains with BlueHost. Sound confusing? Don’t worry! I will explain in full detail below!

BlueHost Web Hosting

Why Sign Up For BlueHost?

Programming Matrix

BlueHost is a very trusted web host, one that I’ve heard great things about over the years. They are extremely reliable and moreover offer the ability to host multiple domains within a single account (with unlimited bandwidth) for only $6.95 per month (or possibly less if you have a coupon). This is a dream come true for all you domainers out there! So, I signed up and thought it would be super easy to instantly host multiple sites within one simple account.

As a side note, I’m a big proponent of online marketing diversification. As you publish more and more websites, it’s extremely important to go with multiple hosts and registrars. Looking to diversify, it made perfect sense for me to give BlueHost a try. In your quest to diversify, I recommend GoDaddy, BlueHost, and Host Gator on the hosting side. On the registrar side, I recommend GoDaddy and Moniker. As your side business expands, diversification mitigates risk of downtime.

BlueHost and Add-On Domain Confusion

Signing up for BlueHost with your initial domain is super easy. You point your nameservers to BlueHost, open an account, link in the domain, upload your website, and you’re done. When you want to start hosting an additional add-on domain, however, things can get a little tricky (but I will fully explain all the steps to make the process a breeze for you).

Specifically, BlueHost stores files for your add-on domain as a sub-folder of your main domain. For example, let’s say I have two sites, example1 (main site) and example2 (add-on site). All files for example2 will be in a subfolder under example1 (you can name the subfolder whatever you want but I recommend just keeping it simple and sticking to the site’s name).

To make things even more confusing, BlueHost also makes example2 a subdomain of example1 (you can name the subdomain whatever you want but I recommend just keeping it simple and sticking to the site’s name).

Of course, example2 will also function as a URL on its own.

SEO and Duplicate Content Do Not Mix Well

As you may already know, Google and other search engines hate duplicate content. The fact that your example2 website now shows up three times at three different URLs opens you up to all sorts of duplicate content issues. If Google indexes all three URLs, you will immediately have SEO problems.

However, this can all be prevented with the use of 301 redirects in your .htaccess file. 301 Redirects are the SEO friendly way to tell Google and other search engines that the files for your website have permanently moved to another location. Because you never intended to have a site at or you will clearly want to 301 redirect these two domains to As someone who has previous experience with .htaccess, I thought the 301 redirects would be a breeze in this case but they actually gave me a run for my money.

How To Configure Your BlueHost .htaccess Files For Add-On Domains

I’d like to close this article out with the actual code you’ll want to use in your .htaccess files, both the one in your root www folder for your main domain and the one(s) in your add-on domain folder(s). I first tired to leverage cPanel’s redirect GUI to make this happen, but it didn’t fully work. The code below is a combination of my use of cPanel’s GUI and my own trial and error.

Your Main Site’s .htaccess File

(In the following code, example1 is your main site and example2 is your add-on site.)

Options +FollowSymLinks
RewriteEngine On

Redirect 301 /example2/
Redirect 301 /example2

RewriteCond %{HTTP_HOST} ^example1\.com$ [NC]
RewriteRule ^(.*)$$1 [R=301,L]

Your Add-On Site’s .htaccess File

(In the following code, example1 is your main site and example2 is your add-on site.)

Options +FollowSymLinks
RewriteEngine On

RewriteCond %{HTTP_HOST} ^$ [OR]
RewriteCond %{HTTP_HOST} ^$
RewriteRule ^(.*)$ "http\:\/\/www\.example2\.com\/$1" [R=301,L]

RewriteCond %{HTTP_HOST} ^example2\.com$ [NC]
RewriteRule ^(.*)$$1 [R=301,L]

An Extra 301 Redirect To Help You Out

If you’re an .htaccess wizard, you may have noticed that I not only help you out here with the above discussed 301 redirects, but I also help redirect non-www versions of your site to the www version (via 301 redirects as well), another common SEO duplicate content issue for many sites. I sincerely hope this helps you out. It’s truly amazing that for only $6.95 per month you can now host multiple sites in an SEO-friendly manner with just a little up front work understanding and configuring your .htaccess file.

Did you find this post helpful? Looking to sign up for BlueHost or HostGator? I would sincerely appreciate it if you signed up through my BlueHost affiliate link or my HostGator affiliate link. The affiliate commissions help me maintain and expand PPC Ian! Thanks so much!

Disclaimer: Please use this code at your own risk. Your .htaccess file is a very powerful tool. Before making any changes, please back up your entire site. is not liable for any problems that may arise from following these examples.

Image of Programming Matrix © iStockPhoto – Raycat

4 Trackbacks

  1. Happy 2nd Birthday To PPC Ian | PPC Ian
  2. Review: Make Money Online By John Chow | PPC Ian
  3. I Upgraded To HostGator VPS Level 3 Hosting | PPC Ian
  4. Happy Birthday To PPC Ian! | PPC Ian


  1. Jake says:

    Keep us posted! I can’t wait to see how you’re 6 (or more!) websites turn out.


  2. Ian says:

    Hi Jake,
    Thanks so much for the comment! I will definitely keep you posted as I start making some progress.
    All the best,

  3. Josh says:

    Oh man! this is exactly what I needed!!!! You just solved my bluehost problem! – Josh

  4. Ian says:

    Awesome, that’s great to hear! Josh, thanks for reading my blog. I’m glad I could help!
    All the best,

  5. Doyle Lewis says:

    The .htaccess should actually be much, much simpler than that. In your example2 folder use the following code:

    RewriteEngine On
    RewriteCond %{HTTP_HOST} !^www\.example2\.com
    RewriteRule (.*)$1 [R=301,L]

    That will check the host for all requests for a file in that folder and redirect if they aren’t what you want. Then you’re not having to manage multiple code chunks in multiple files. Also allows you to control the www or no-www if you want, with one small change in the same 3 lines of code.

    Friends with JV, found your site from the interview there.

  6. Ian says:

    Thanks Doyle for the tip and for visiting my site! Really appreciate it. As someone relatively new to .htaccess, always looking to learn more and appreciate your insights.
    All the best,

  7. Elise says:

    Thanks for this! I’ve been back and forth with the Bluehost team about this problem. When I just stuck that add-on code of yours into my main .htaccess… my site FINALLY worked! What a relief!

  8. Ian says:

    Thank you for visiting my site and for the comment! You are quite welcome! I’m glad I could help.
    All the best,

  9. Paul B says:

    Hi Ian,

    I’ve been using Bluehost for a couple of years and have several accounts and dozens of domains. I’ve never bothered with redirecting the other “copies” of the subdomains and have never noticed any negative SEO impact, I’m assuming because there is no reason why those URI’s would be crawled and indexed? Am I missing something here? I’ll certainly be going over 1 or 2 domains in great detail just to make sure, thanks for the tip.


  10. Ian says:

    Thanks so much for visiting my blog and for the comment! You bring up a VERY good point. I’m a VERY paranoid guy. When it comes to SEO, I freak out about stuff and therefore take every precaution possible to prevent issues from coming up. You are exactly right that if you never link to the URLs you don’t want indexed, they theoretically shouldn’t get indexed. However, it’s been my experience in the past that stuff always gets indexed when I don’t want it to. Google is really great at that! :-) For this reason, I’m all about taking the added precaution of redirecting the versions I don’t want indexed. Thanks again for sharing your experience!
    All the best,

  11. Paul B says:


    I guess I work the other way around – I never try to fix anything until I know for sure that it’s broke! I can be in denial for quite some time :) What I like about the latest evolution of the search engines is how easy it is to make corrections and alter what content they see and how they see it.


  12. Ian says:

    Makes total sense. :-) Always enjoy learning from other perspectives and thanks again for the comments. Looking forward to learning more about your SEO strategies and experience!
    All the best,

  13. Hey Ian,

    Interesting post – I found it by searching for ‘bluehost addon domains duplicate content’.

    Have you had additional thoughts on the necessity of the 301s to avoid dupe content from the addons? I’m considering doing the 301 as well (hence my google search). Have you tried incorporating Doyle Lewis’s .haccess with success?

    Slightly off topic – do you have any personal recommendations for reasonably priced hosting solutions that offer different IPs for different domains without having to pay for new accounts?



  14. To follow up – I’ve implemented Doyle Lewis’s version of the .htaccess and can attest that it works properly.

  15. Ian says:

    Hey Matt,
    Thanks so much for the comment and for visiting my site, I truly appreciate it! I actually hadn’t had the chance to try Doyle Lewis’s code yet so it’s absolutely awesome to hear that it works for you. Thanks so much for circling back and sharing that info!

    In terms of reasonably priced hosting solutions that offer different IPs for different sites within the same overall account, that’s a great question. Unfortunately, I don’t have a great answer for you. On the domain development side, my portfolio isn’t too big so I’ve been able to to solve the IP issue by having several accounts across the cheap but great hosts such as Blue Host and Host Gator. At some of these guys, I have more than one account (each on a different box). I originally pursued this strategy for stability (if one host goes down, I didn’t want it to wipe out all of my sites), but it also has the added benefit of diversifying across IPs.

    Thanks once again, Matt, and I’m looking forward to checking out your site as well!
    All the best,

  16. It’s a pleasure Ian.

    I’m sitting here right now wondering about the addon domain situation with Bluehost. I set up wordpress on an addon last night, and in the footer of the WP install I see copyright springboard SEO (my primary domain). I didn’t associate anything in the addon domain with Springboard SEO.

    I’m really starting to wonder if the search engines will see the sites as being unique entities. The fact that the addons are subdomains of the primary domain has me concerned.

  17. Ian says:

    Hey Matt,
    Thanks once again for sharing. That is really interesting. I’m definitely not a WordPress guru ( is my first WordPress site) so I’m unfortunately not able to help you. The sites that I’m hosting as add-on domains are typically 5-page minisites, all hard coded in HTML. For this particular use case, I have no issues with the add-on domains with proper htaccess 301 redirects. However, I can see your point with your add-ons referencing your main site. There has got to be a way around this! While I don’t have the answer, you may wish to ask some of the domainers linked too in my blogroll. I know at least a few of these guys leverage WordPress as their domaining platform and must have a workaround for this. Best of luck and thanks once again for your valuable comments!

  18. I’m having some trouble getting this to work properly. For my simple websites, it is working fine but for my PHPLinkDirectory — not so much. If you do the following search on google you’ll see my problem:
    This is the 301 dupe content issue that people keep tlaking about on bluehost. Somehow that subdomain for my directory got indexed. When you go to some of the indexed URLs ( you get forwarded to — do you think that this is bad for SEO or it will work properly? I’m really think I’m getting penalized for this problem.

  19. Jim says:

    BlueHost is getting worse, It really sucks

  20. Ian says:

    Thanks so much for visiting PPC Ian and for the comment! I’m sorry to hear BlueHost is not working well for you. I have had good luck with them. Let me know if there’s anything I might be able to help out with!
    All the best,

  21. Ian says:

    Hey Andrew,
    Thanks so much for visiting PPC Ian and for the question! I took a quick look at your site and am not so sure I fully understand your issue. It might make sense to discuss over email to see if I can help you resolve your issue. Then, once we figure it out, I can post the solution here! Please check out my contact me page for my email. Thanks again!
    All the best,

  22. Ian, I’m glad you like BlueHost but when I used them for a short period, my server went down for over 24 hours without them notifying me AT ALL. The thing is, this was my TRACKING server meaning my entire business was down for 24 hours. Poor business model on my part, possibly, but extremely poor on theirs? Definitely.

    I’ve since moved onto bigger and better through WiredTree and could not speak highly enough of them.


  23. Sandman says:

    Very usefull..Really thx.

  24. Ian says:

    Glad my tips helped. Thanks for the comment!
    All the best,

  25. Andy Eaton says:

    wow I have about 6 sites on bluehost, I never heard of this seo problem until now, does it really cause any problems? I’m not sure of I should change it or not. Also does hostgator do this aswell. thanks

  26. Ian says:

    Hey Andy,
    Thanks for the comment! While there are many successful sites that do not 301 redirect properly, this is something I’d definitely fix. It’s really simple and is huge in terms of mitigating downside risk of double indexing. I use the code from this example in both my BlueHost account and my Host Gator accounts (I use both of these hosts). It should work fine in both of them! Best of luck to you!
    All the best,

  27. Hi Ian,

    I found your website via John Chow’s website. I am glad I did because it has lots of great posts and information on how-to get the most from PPC and more. I will definitely become a regular visitor. Now to my question about .htaccess files.

    I am currently with A2_Hosting on a Web Hosting Plan with a main domain plus several sub-domains. All the domains are separate sites that I want to be seen as separate. I am having trouble implementing the above code. It keeps failing – actually, it appears to be a looping issue. I am not too familiar with coding .htaccess files and did some research before landing here on your site. I feel pretty confident from my little knowledge that your code should work on my site. I place the code inside the .htaccess files as shown above. I try to load the sub_domain and get an error “The page isn’t redirecting properly”. I wonder if it’s a hosting issue. I have been wanting to move to HostGator and maybe this is the last straw. One of my sites is called

    Any help is greatly appreciated! -Matt

  28. Ian says:

    Hey Matt,
    Thanks so much for the comment! It’s great to hear my blog commentating on John Chow is working. :-) I’m sorry to hear about your hosting issues. When I look at your http header, it does appear that you have a looping issue. When I go to your domain with the “www”, it still does a 301 redirect to the exact same URL. While I’m not sure if the code in this post is perfect, it has gotten the job done for me on both BlueHost and also HostGator (between the two I now have about 30 websites hosted in just two accounts using this htaccess code). I would recommend both of these as quality web hosts for those looking to host multiple domains from the same account with the SEO benefits of 301 redirects in place. You may want to call the support of A2_Hosting and see if they can help. Thanks again and please report back here if you find the fix!
    All the best,

  29. Hi Ian,
    Thanks for the nice reply. I figured as much that I had a looping issue. I appreciate you taking the time to provide me some input on this issue. I haven’t heard back from A2 Hosting as of yet and so I might be switching web hosts this weekend. BTW, do I give you the referral credit or John Chow. It’s a dilemma in the making. I will report back once I have resolved the issue.
    Take Care,

  30. Ian says:

    Thanks Matt,
    Glad I could help (at least a little). As one last suggestion, I would recommend clearing out the htaccess files from both your root domain and your add-on domain. Then, get both sites uploaded and make sure they both function. After that, then upload the new htaccess to the add-on domain folder. Last, upload the other new htaccess to the root domain. This is the order of operations I typically follow and just want to make certain you’re using the same order of operations in case it actually affects the end result.

    Sometimes, even after doing this, my sites will fail the first time I ping them, but then they work every time thereafter. Whenever I change my htaccess files on either BlueHost or HostGator, I always test all sites (both primary and all add-ons) to make sure they all work because sometimes simply changing the htaccess causes them to fail the first time after the change. Although, this is not the case you have right now because it’s stuck in a loop each time I test your site.

    In terms of who’s affiliate link to use, it’s really up to you. :-) Of course, I’d sincerely appreciate if you used mine because I can use all the revenue I can get to keep my blog running and updated as much as possible. That said, it’s really up to you. I would look at such factors as who provided you the most value and also if you can find any discounts and special deals anywhere. Of course, I’m a huge fan of John Chow as well, he has a fantastic blog and one that I frequent every single day.

    Thanks once again for the comments, I very much appreciate it!
    All the best,

  31. Hey Ian,

    I have been SUCCESSFUL with the solving the redirect issue. Both the main site & sub-sites redirect from a non-www to a www without any lingering problems. I used the original code from your post since I didn’t notice any confirmation from you to use the suggested code from Doyle Lewis. I may do more research in the near future to better understand the .htaccess scripting, but will leave it for now since it’s working.

    “How did I fix the problem?” At first, I waited to get a response back from my current host provider (A2 Hosting). I received an email from them telling me to try and fix the issue within the redirect page inside cPanel. I had already done this several times and I had explained this to them in a couple of different emails. Very frustrating. I decided to pull my main domain plus two other sub domains from A2 Hosting and move them to HostGator. Since HostGator offers a 30 day guarantee, I had nothing to lose. The first thing I noticed with switching to HostGator was the HUGE speed improvement. I didn’t expect this surprise.

    After I moved my domains to HostGator, I continued to be plagued with the same redirect issue. I loaded the above code to both my main and sub-domain sites. The sites were continually flipping back and forth between non-www & www. I didn’t know what to do so I contacted Host Gator tech support chat via cPanel. After two hours on chat with HostGator tech support, we were able to track down the problem. I had a WordPress blog loaded on each of my sites. When I looked at the configuration file, I noticed that both my WordPress url and Site Address url had the non-www designated selected. It was a very simple solution. The tech support center was very committed to helping me to resolve this redirect issue and I was very impressed by there level of commitment. I am very happy with my experiences with HostGator and will be moving the remainder of my sites to them.

    Take Care, Matt

  32. Ian says:

    Wow! What a great story. :-) Thanks so much for sharing, I’m sure this will be incredibly helpful to everyone reading this post, especially those trying to host multiple WordPress blogs within the same HostGator of BlueHost account. I have not run into this issue because, believe it or not, PPC Ian is my only WordPress blog. The rest of my SEO websites are either static websites or on the Epik product portal platform. Sometimes, this makes things difficult! I have static websites hard coded in HTML that are nearly 200 pages in size (it’s a big effort to update them). But, I digress…

    You are correct, I have not tried the code from Doyle Lewis yet. I’ve got something that works so I’m reluctant to mess with it too much. :-) I’m so happy to hear that your issue has been resolved and that HostGator technical support was so amazingly helpful. Thank you once again for the awesome comments. It’s really great to hear about your success in debugging this issue!

    All the best,

  33. Thank you, Ian. I really appreciate all the support that you gave me through this ordeal. I am so spent. It’s a relief to have found a solution. BTW, you must have some old sites if they are purely static websites. Looks like you have found a great portal platform — Epik. I look forward to reading more of your posts on here. Take Care, Matt

  34. Sarah says:

    Hi Ian,
    I’ve used your article as a handy reference in the past re: setting up addon domains at BlueHost, but recently ran into a few issues with it when using multiple WordPress installs in the same hosting account (I’ve outlined the solution on my own blog). Nevertheless, I wanted to say a quick thanks for providing this info for other BlueHost customers to use – I found there was a huge lack of practical advice/examples regarding their support for addon domains when starting out. Many thanks!

  35. ahmadhaikal says:

    how long you already try bluehost?

  36. Ian says:

    Thanks so much for visiting my blog and for the comment! :-) I truly appreciate it. I’m looking forward to checking out your blog and reading your article about BlueHost and WordPress. You are exactly correct and that in my case I’m only working with static sites (not WordPress sites). Thanks again!
    All the best,

  37. Ian says:

    Thanks for the comment, ahmadhaikal. I’m a big fan of BlueHost and have had an account with them for around two years now. I also leverage a multitude of other hosting accounts (with other hosts) since I operate around 100 active web properties (and counting). I honestly probably have too many hosting accounts at this point, but I like the diversification of it all!

  38. Matt says:

    Thanks for the quick fix :)

  39. Ian says:

    I appreciate the comment! You are very welcome!
    All the best,

  40. Poonam says:

    Thanks for the code. I was having lots of trouble with a client’s add on domain on Bluehost. This solved my problem!

  41. Mike says:

    I ran into this issue last night, contact BlueHost via their “live chat” feature, got some info. that didn’t work right, went on a Google search, came across your post, implemented, and … you’re awesome! Thanks so much bro!

  42. PPC Ian says:

    Thanks so much for the comment! I’m so glad I could help! Best of luck with your BlueHost account and websites!
    All the best,

  43. Thanks for this. Simple straight forward answer to my question about the add-on domain .htaccess file.

  44. Kevin says:

    Very helpful. Thanks.

Leave a Comment