Submit Your Article Forum Rules

Results 1 to 8 of 8

Thread: Help me resolve duplicate content indexing

  1. #1

    Help me resolve duplicate content indexing

    I have hosted my sites with Bluehost.com and the primary domain of the account let's say in this situation is maindomain.com

    I bought another domain which we'll say newdomain.com and is linked with the hosting as an Addon domain.

    Now here's my problem...............

    Usually when you add an Addon domain in the cPanel it automatically creates a folder for it to upload the file. So the site can be accessed through maindomain.com/newdomain or newdomain.com.

    In my bluehost's hosting package it also created a subdomain for it, for example we'll say newdomain.maindomain.com

    So to avoid duplicate content issues I have added the following lines in the .htaccess file in the main directory of maindomain.com

    Redirect 301 /newdomain/ http://www.newdomain.com/
    Redirect 301 http://newdomain.maindomain.com/ http://www.newdomain.com/

    When I search for site:maindomain.com in google I see it has indexed pages from maindomain.com/newdomain and newdomain.maindomain.com. And maindomain.com/newdomain redirects and works fine but the problem is the indexing. About newdomain.maindomain.com, just this URL redirects to newdomain.com and any other pages such as newdomain.maindomain.com/page1 never redirects.

    Please help me in this to resolve this issue as soon as possible.

  2. #2
    WebProWorld MVP claybutler's Avatar
    Join Date
    Oct 2005
    Location
    Santa Cruz, CA
    Posts
    736
    That's really odd. I wonder how that happened. I have probably 40 domains hosted over four accounts at Bluehost and have never had that problem. Did you actually upload content into the subdomain folder?

  3. #3
    It's like this (you already may know it), when I add an Addon domain it creates a folder for it in the root folder. I uploaded the files there. But since it also creates a subdomain automatically and when you visit the the subdomain, there's the same content. The redirection doesn't work. Is there a problem with my htaccess code?
    Last edited by freetutes; 10-06-2011 at 02:49 PM.

  4. #4
    WebProWorld MVP claybutler's Avatar
    Join Date
    Oct 2005
    Location
    Santa Cruz, CA
    Posts
    736
    That's what I don't understand. I looked in my root and I don't see subdomains only domains.

    I think when you did your add on domain you checked a box or something that set that up. It always creates a subdomain as a courtesy, but I've never experienced blueshost actually installing a directory for it.

    I really don't know how Google is indexing your subdomain. Any links pointing to it? Google is not indexing the content from any of the subdomains on my accounts even though you can see the same site if you put in the url in the address bar and go to it directly.

  5. #5
    That's what I've been wondering about too... There's not even a single link that points to those subdomain. How in the hell did google find it? Even I didn't know this until I did the site search on Google...

  6. #6
    Administrator weegillis's Avatar
    Join Date
    Oct 2003
    Posts
    5,789
    This is one example where a canonical tag might come in handy, just for added clarification, on top of your 301's. Google will see it, and likely the other big ones will, too. Make the URL the one you want in the index.

  7. #7
    Moderator Tiggerito's Avatar
    Join Date
    May 2004
    Location
    Adelaide, Australia
    Posts
    572
    This should make sure all pages get redirected (not tested):

    Code:
    RewriteRule ^newdomain/(.*)$  http://maindomain.com/$1 [R=301,NE,NC,L]
    
    RewriteCond %{HTTP_HOST}  ^newdomain\.maindomain\.com$ [NC]
    RewriteRule ^(.*)$  http://maindomain.com/$1 [R=301,NE,NC,L]
    by Hidden Content (Tiggerito)
    owner of Hidden Content

  8. #8
    Member usabilityfreak's Avatar
    Join Date
    Jul 2003
    Location
    Goose Creek, SC
    Posts
    34
    Make sure your pages don't have any references to newdomain.maindomain.com or maindomain.com/newdomain like might be found in CSS stylesheet paths, and image paths. I'm assuming from what I've already read that you are not linking to any of the pages in the newdomain.maindomain.com or maindomain.com/newdomain so Google has to "see" those places somehow. Perhaps an XML-Sitemap plugin?

    At any rate, similar to claybutler I've got several add-on domains on my servers where in FTP I navigate to them via FTP using the folder structure maindomain.com/newdomain but I've no indication that any search engines are aware of those.

    Check all of your pages for paths and (if you use them) check plugins.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •