hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Web Hosting : Please solve this problem
Reply

Web Hosting Discussions on all aspects of web hosting including past experiences (both negative and positive), choosing a host, questions and answers, and other related subjects. If your service is unavailable, please click here.
Forum Jump

Please solve this problem

Reply Post New Thread In Web Hosting Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 06-25-2011, 03:15 AM
teper teper is offline
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?

Reply With Quote


Sponsored Links
  #2  
Old 06-25-2011, 03:52 AM
teper teper is offline
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

Reply With Quote
  #3  
Old 06-25-2011, 04:14 AM
care4server care4server is offline
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

Reply With Quote
Sponsored Links
  #4  
Old 06-25-2011, 04:20 AM
PlexHosted PlexHosted is offline
New Member
 
Join Date: May 2011
Posts: 4
I would suggest to configure 301 redirect from xyz.com folder to xyz.com via .htaccess

Reply With Quote
  #5  
Old 06-25-2011, 04:20 AM
MikeDVB MikeDVB is offline
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

Reply With Quote
  #6  
Old 06-25-2011, 04:55 AM
teper teper is offline
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 View Post
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 View Post
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.
Reply With Quote
  #7  
Old 06-25-2011, 05:03 AM
UnderHost UnderHost is offline
Offshore Hosting Specialists
 
Join Date: May 2008
Location: Montreal, Canada
Posts: 927
Quote:
Originally Posted by teper View Post
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 VPSUSA Cloud Virtual Private Servers - Dedicated and Scalable Resources - Parallels® Virtuozzo
Hong Kong - SG - USA - Canada - Netherlands - UK - Germany - Panama - Malaysia - Russia

Reply With Quote
  #8  
Old 06-25-2011, 05:08 AM
teper teper is offline
Newbie
 
Join Date: Mar 2010
Posts: 17
Quote:
Originally Posted by UnderHost View Post
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.

Reply With Quote
  #9  
Old 06-25-2011, 05:42 AM
JamesOakley JamesOakley is offline
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

Reply With Quote
  #10  
Old 06-25-2011, 06:12 AM
MikeDVB MikeDVB is offline
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

Reply With Quote
  #11  
Old 06-25-2011, 06:22 AM
008Rohit 008Rohit is offline
WHT Addict
 
Join Date: May 2011
Location: Kolkata, India
Posts: 106
Quote:
Originally Posted by MikeDVB View Post
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?

__________________
<<< Please see Forum Guidelines for signature setup. >>>

Reply With Quote
  #12  
Old 06-25-2011, 06:23 AM
MikeDVB MikeDVB is offline
Web Host Extraordinaire!!!
 
Join Date: Dec 2007
Location: Indianapolis, Indiana USA
Posts: 14,315
Quote:
Originally Posted by 008Rohit View Post
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

Reply With Quote
  #13  
Old 06-25-2011, 06:29 AM
008Rohit 008Rohit is offline
WHT Addict
 
Join Date: May 2011
Location: Kolkata, India
Posts: 106
Quote:
Originally Posted by MikeDVB View Post
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.

__________________
<<< Please see Forum Guidelines for signature setup. >>>

Reply With Quote
  #14  
Old 06-25-2011, 06:40 AM
MikeDVB MikeDVB is offline
Web Host Extraordinaire!!!
 
Join Date: Dec 2007
Location: Indianapolis, Indiana USA
Posts: 14,315
Quote:
Originally Posted by 008Rohit View Post
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

Reply With Quote
  #15  
Old 06-25-2011, 03:20 PM
fshagan fshagan is offline
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.

Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Got a problem nobody could solve ? darksoul Systems Management Offers 0 06-10-2010 07:25 AM
can anyone solve my problem? Litonice10 Computers and Peripherals 4 02-04-2010 10:25 PM
help me solve a problem!! simple solutions Web Hosting Lounge 5 06-28-2006 01:59 PM
Please help to solve this problem: PeterS Programming Discussion 4 10-17-2004 04:53 AM

Related posts from TheWhir.com
Title Type Date Posted
How To Deliver Products Customers Will Pay For with David Koston - HostingCon 2012 Web Hosting News 2012-07-18 10:46:16
IPv6 Co-Inventor Bob Hinden Talks World IPv6 Launch Web Hosting News 2012-06-06 12:29:34
Software Developer Proposes New Standards for SSL Security Web Hosting News 2012-02-27 12:57:36
Interconnection Solutions Firms Neutral Tandem/Tinet Rebrand as Inteliquent Web Hosting News 2012-02-07 15:43:59
GlowTouch CSO Michael Fountain Gives Blueprint for Turning Ideas into Products Web Hosting News 2011-08-10 23:29:24


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?