
06-25-2011, 03:15 AM
|
|
Newbie
|
|
Join Date: Mar 2010
Posts: 17
|
|
Please solve this problem
I have a shared hosting account with 5 add on domains
Let us suppose i have abc.com as the main domain and added xyz.com as the add on domain. Now in the file manager there will be a folder named xyz.com where i can upload my website files for xyz.com
But here is this little problem i am facing. I can access xyz.com from this url also abc.com/xyz.com Now this will create duplicate content issue. Is there any solution to this problem?
|

06-25-2011, 03:52 AM
|
|
Newbie
|
|
Join Date: Mar 2010
Posts: 17
|
|
and also after adding an add on domain, a sub domain xyzcom.abc.com is automatically created.How to remove this sub domain
|

06-25-2011, 04:14 AM
|
|
Web Hosting Evangelist
|
|
Join Date: Sep 2010
Location: home
Posts: 508
|
|
you can try .htaccess rule to block access by url abc.com/xyz.com
|

06-25-2011, 04:20 AM
|
|
New Member
|
|
Join Date: May 2011
Posts: 4
|
|
I would suggest to configure 301 redirect from xyz.com folder to xyz.com via .htaccess
|

06-25-2011, 04:20 AM
|
|
Web Host Extraordinaire!!!
|
|
Join Date: Dec 2007
Location: Indianapolis, Indiana USA
Posts: 14,315
|
|
mod_rewrite is a solution or you could create the add-on domains outside of public_HTML if your provider allows it.
Realistically if you never site map those addresses or visit them then google won't know. But put a rewrite in the addon domain .htaccess that checks for the right domain and redirects if it's not right :-).
__________________
█ Michael Denney - MDDHosting, LLC - Professional Hosting Solutions
█ LiteSpeed Powered - Shared, Reseller, Semi-Dedicated, and VPS
█ For high-end shared accounts ideal for business, check out our Semi-Dedicated offerings!
█ http://www.mddhosting.com/ - Providing Quality Services since 2007
|

06-25-2011, 04:55 AM
|
|
Newbie
|
|
Join Date: Mar 2010
Posts: 17
|
|
Found a solution to the first problem
Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www.)?domain.com$ [NC]
RewriteCond %{REQUEST_URI} ^/addonfolder/(.*)$
RewriteRule ^(.*)$ - [L,R=404]
Can any body help me with the coding for the second problem of sub domain?
Quote:
Originally Posted by MikeDVB
you could create the add-on domains outside of public_HTML if your provider allows it.
|
That's interesting. How to know if my host support this feature?
Quote:
Originally Posted by MikeDVB
Realistically if you never site map those addresses or visit them then google won't know.
|
Just taking precautions because of panda update.
Last edited by teper; 06-25-2011 at 05:03 AM.
|

06-25-2011, 05:03 AM
|
|
Offshore Hosting Specialists
|
|
Join Date: May 2008
Location: Montreal, Canada
Posts: 927
|
|
Quote:
Originally Posted by teper
Found a solution to the first problem
Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www.)?domain.com$ [NC]
RewriteCond %{REQUEST_URI} ^/addonfolder/(.*)$
RewriteRule ^(.*)$ - [L,R=404]
Can any body help me with the coding for the second problem of sub domain?
|
You can just delete the subdomain created via cPanel without problem.
__________________
█• UnderHost Inc. • Offshore Hosting Solutions and USA/Canadian based servers.
█• 24/7 Rapid Support / 99.9% Uptime Guarantee / Shared / Reseller / VPS / Dedicated
█• Premium VPS • USA Cloud Virtual Private Servers - Dedicated and Scalable Resources - Parallels® Virtuozzo
█• Hong Kong - SG - USA - Canada - Netherlands - UK - Germany - Panama - Malaysia - Russia •
|

06-25-2011, 05:08 AM
|
|
Newbie
|
|
Join Date: Mar 2010
Posts: 17
|
|
Quote:
Originally Posted by UnderHost
You can just delete the subdomain created via cPanel without problem.
|
That is the main problem. While adding an add on domain a sub domain is created automatically in cpanel and strangely it is not present in the sub domain section also. Must be a problem with cpanel.
|

06-25-2011, 05:42 AM
|
|
Honesty Simplicity Clarity
|
|
Join Date: Oct 2010
Location: Kent
Posts: 1,711
|
|
Try
Code:
RewriteCond %{HTTP_HOST} ^xyz\.abc\.com$ [NC]
RewriteRule ^(.*)$ http://www.abc.com/$1 [L,R=301]
__________________
██ James Oakley, OakHosting.NET | UK Support | US Servers | Pay in £, $ or €
██ Celebrating 2 years providing Affordable, Reliable Hosting with Personal Service
██ Specialising in the needs of individuals, charities and churches. Plans start small.
██ ..Drupal a speciality - Drush and Git. PHP 5.4 or 5.3; cPanel; Percona SQL Server; Varnish; Apache 2.4
|

06-25-2011, 06:12 AM
|
|
Web Host Extraordinaire!!!
|
|
Join Date: Dec 2007
Location: Indianapolis, Indiana USA
Posts: 14,315
|
|
Put this in the directory with the add-on domain and no matter how it's loaded (be it addon.maindomain.com or maindomain.com/addon it will see that the http_host is not www.the-add-on.com and redirect there with a 301 (permanent) redirect so that search engines do not index the incorrect URL and only index the correct destination. You will want to add a new line for the HTTP_HOST for any subdomains you use on the add-on domain so they do not get redirected.
Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.\the-add-on\.com$
RewriteRule ^(.*)$ https://www.the-add-on.com/$1 [R=301,L]
__________________
█ Michael Denney - MDDHosting, LLC - Professional Hosting Solutions
█ LiteSpeed Powered - Shared, Reseller, Semi-Dedicated, and VPS
█ For high-end shared accounts ideal for business, check out our Semi-Dedicated offerings!
█ http://www.mddhosting.com/ - Providing Quality Services since 2007
|

06-25-2011, 06:22 AM
|
|
WHT Addict
|
|
Join Date: May 2011
Location: Kolkata, India
Posts: 106
|
|
Quote:
Originally Posted by MikeDVB
mod_rewrite is a solution or you could create the add-on domains outside of public_HTML if your provider allows it.
|
I want it badly. Can you set this up for me?
|

06-25-2011, 06:23 AM
|
|
Web Host Extraordinaire!!!
|
|
Join Date: Dec 2007
Location: Indianapolis, Indiana USA
Posts: 14,315
|
|
Quote:
Originally Posted by 008Rohit
I want it badly. Can you set this up for me?
|
Want what badly? You can already create a domain outside of your public_html, just when you go to create the domain edit out the "public_html/" part.
__________________
█ Michael Denney - MDDHosting, LLC - Professional Hosting Solutions
█ LiteSpeed Powered - Shared, Reseller, Semi-Dedicated, and VPS
█ For high-end shared accounts ideal for business, check out our Semi-Dedicated offerings!
█ http://www.mddhosting.com/ - Providing Quality Services since 2007
|

06-25-2011, 06:29 AM
|
|
WHT Addict
|
|
Join Date: May 2011
Location: Kolkata, India
Posts: 106
|
|
Quote:
Originally Posted by MikeDVB
Want what badly? You can already create a domain outside of your public_html, just when you go to create the domain edit out the "public_html/" part.
|
Never really noticed it. Silly me!
Thanks a lot for helping. 
|

06-25-2011, 06:40 AM
|
|
Web Host Extraordinaire!!!
|
|
Join Date: Dec 2007
Location: Indianapolis, Indiana USA
Posts: 14,315
|
|
Quote:
Originally Posted by 008Rohit
Never really noticed it. Silly me!
Thanks a lot for helping. 
|
Sure thing.
__________________
█ Michael Denney - MDDHosting, LLC - Professional Hosting Solutions
█ LiteSpeed Powered - Shared, Reseller, Semi-Dedicated, and VPS
█ For high-end shared accounts ideal for business, check out our Semi-Dedicated offerings!
█ http://www.mddhosting.com/ - Providing Quality Services since 2007
|

06-25-2011, 03:20 PM
|
|
Web Hosting Master
|
|
Join Date: Jun 2003
Location: California
Posts: 2,475
|
|
robots.txt would also work if you want to maintain access through the subdomain and don't want to use a rewrite rule. Just deny the subdomain and Google won't index it as a subdomain.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
| Postbit Selector |
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|
| Login: |
|
|
| Advertisement: |
|
|
| Web Hosting News: |
|
|
|