FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


cpanel and addon domains





inphurno
i have a question about how to setup a domain using cpanel but its not at frihost, so can i ask this question here or should this go to another section?
inphurno
since no one complained i will post my questions here Very Happy so over here on frihost I use DirectAdmin so I never used the cpanel interface before. i was helping a friend to move his site to a new hosting provider and i noticed that when you create an addon domain in the cpanel you also create a subdomain on the main domain of the hosting.

i contacted his tech support and they told me that's how cpanel works and that i could use rewrite rules to fix the problem. i found this really annoying since i figure there would be seo problems if you have 2 addresses with the same content. i read a bit on the net and i came up with this solution to remove the 2 urls created by the subdomain made by cpanel (2ndDomain.1stDomain.com and 1stDomain.com/2ndDomain.com):

RewriteCond %{HTTP_HOST} ^(www.)?2ndDomain.1stDomain.com [NC]
RewriteRule ^(.*)$ http://www.1stDomain.com/ [L,R=301]

RewriteCond %{HTTP_HOST} ^(www\.)?1stDomain\.com$
RewriteRule ^2ndDomain.com/(.*) http://www.1stDomain.com/ [R=301,L]

I'm guessing there must be other people ot there that have had this problem so let me know if this solution makes sense or what you did to fix this problem. thanks in advance!
inphurno
I'm sure I'm not the only person here who has or takes care of hosting elsewhere then frihost. so i'm wonder has no one ever run into this problem before?

from what i can tell cPanel hosting is pretty common but no one ever try to setup more than one domain with this type of web admin interface? Please guys and gals any help with this would really great for our non-profit org so that we can figure out what to do for our hosting.
Bondings
If you use DirectAdmin, you can add the subdomain as an additional domain and avoid all the problems. Maybe this works in cPanel too (although I doubt it).
inphurno
Bondings wrote:
If you use DirectAdmin, you can add the subdomain as an additional domain and avoid all the problems. Maybe this works in cPanel too (although I doubt it).


thanks for responding Bondings Smile from what i can tell DirectAdmin and cPanel do not work the same. i setup the additional domain as an addon domain but like i said cPanel setups up things differently than how i was used to things in DirectAdmin. when you create an addon domain in the cpanel you also create a subdomain on the main domain of the hosting.

the folder for the cPanel "addon domain" is in the folder of the main domain of the account just like a subdomain and there is no "domains" folder like in DirectAdmin. so the way i'm used to addon domains doesnt seem to be the same in cPanel and thats why i posted to ask what other did to fix this problem...
mOrpheuS
inphurno wrote:
i noticed that when you create an addon domain in the cpanel you also create a subdomain on the main domain of the hosting.

i contacted his tech support and they told me that's how cpanel works and that i could use rewrite rules to fix the problem. i found this really annoying since i figure there would be seo problems if you have 2 addresses with the same content.

The subdomain, that cPanel creates internally, need not be visible to anyone outside. You just need to make sure that your pages always refer/link to your site with "2ndDomain.com" address, and never using "2ndDomain.1stDomain.com" or "1stDomain.com/2ndDomain" addresses.

How would a search engine index content that it doesn't even know exists ?
inphurno
mOrpheuS wrote:
The subdomain, that cPanel creates internally, need not be visible to anyone outside. You just need to make sure that your pages always refer/link to your site with "2ndDomain.com" address, and never using "2ndDomain.1stDomain.com" or "1stDomain.com/2ndDomain" addresses.

How would a search engine index content that it doesn't even know exists ?


yes thats true that if there are no links on your site to those 2 other urls then google will never find it on its own but if an unfriendly friend were to submit the "2ndDomain.1stDomain.com" or "1stDomain.com/2ndDomain" addresses then i would be in trouble. maybe i'm being paranoid but i dont want setup things wrong and then have problems later...
mOrpheuS
inphurno wrote:
yes thats true that if there are no links on your site to those 2 other urls then google will never find it on its own but if an unfriendly friend were to submit the "2ndDomain.1stDomain.com" or "1stDomain.com/2ndDomain" addresses then i would be in trouble. maybe i'm being paranoid but i dont want setup things wrong and then have problems later...

Actually, the subdomain/subdirectory needn't be named "2ndDomain" at all !

When adding-on 2ndDomain.com, you can as well create the subdomain as some-random-name.1stDomain.com (1stDomain.com/some-random-name).
Now if your mischievous friend can figure out some-random-name on his/her own - then either your script is exposing the directory name somewhere, or your friend possesses some supernatural powers. Wink
inphurno
mOrpheuS wrote:
Actually, the subdomain/subdirectory needn't be named "2ndDomain" at all !

When adding-on 2ndDomain.com, you can as well create the subdomain as some-random-name.1stDomain.com (1stDomain.com/some-random-name).
Now if your mischievous friend can figure out some-random-name on his/her own - then either your script is exposing the directory name somewhere, or your friend possesses some supernatural powers. Wink


haha well thats also true but 1) i do make mistakes, often Rolling Eyes but also as this is not for my usage i dont want to cause any problems for them. about the solution i tried to come up with thats above, is there any problems with that mOrpheuS?
mOrpheuS
inphurno wrote:
about the solution i tried to come up with thats above, is there any problems with that mOrpheuS?

No, I don't believe there's any problem with the 301 redirects solution.
It could be useful in case your pages have somehow already been duplicate indexed.

Otherwise, just like this sentence, it's unnecessary and redundant. Wink
inphurno
mOrpheuS wrote:
inphurno wrote:
about the solution i tried to come up with thats above, is there any problems with that mOrpheuS?

No, I don't believe there's any problem with the 301 redirects solution.
It could be useful in case your pages have somehow already been duplicate indexed.

Otherwise, just like this sentence, it's unnecessary and redundant. Wink


Ok mOrpheuS, i'll take your advice and stop being paranoid Very Happy thanks again for all you help!
Related topics
Most original website contest
Nameservers
addon domains / rndc: connect failed
Can we request 1 more cpanel hosting with same account?
Can someone help me ? Com domain setup?
Pls help me someone.
Cannot determine nameserver ip
parked domains
Can't we add domain?
Addon Domains?
Quick Cpanel Question
parked and addon domains
How to view my stats?
parked and addon domains
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.