Results 1 to 8 of 8
  1. #1

    Block google from caching addon domain as subdomain

    I have a shared hosting account with a root domain like xx.com
    Now I have added an addon domain yy.com. But google is caching my addon on domain as both yy.com and yy.xx.com

    How can I prevent it from caching addon domain as subdomain.

  2. #2
    Join Date
    Nov 2009
    Posts
    544
    Quote Originally Posted by servlet View Post
    I have a shared hosting account with a root domain like xx.com
    Now I have added an addon domain yy.com. But google is caching my addon on domain as both yy.com and yy.xx.com

    How can I prevent it from caching addon domain as subdomain.
    You will need to know something about the robots.txt file.

  3. #3
    I got the solution

    <IfModule mod_rewrite.c>
    RewriteEngine On

    RewriteCond %{HTTP_HOST} main-domain\.com$
    RewriteRule ^(.*)$ "http\:\/\/www.another-domain\.com\/" [R=301,L]

    </IfModule>

  4. #4
    I suppose in this case you can use both robots.txt file and nofollow attributes.
    Also use XML site maps for proper indexing.

  5. #5
    htaccess is better than robots.txt method, but if some things goes wrong in htaccess it will totally prevent google from crawling your site.
    To simply put, robots.txt says google to whether index a page or not. but htaccess literally stops google from crawling.
    HostGuts.com Professional Web Hosting Services
    Shared, Managed Wordpress Hosting, Semi Dedicated Hosting
    LiteSpeed + CloudLinux + RAID Storage + R1Soft Secured

  6. #6
    Thanks guyz, I would prefer htaccess, as I dont want even users to be able to access my site as yy.xx.com

  7. #7
    Join Date
    Jan 2010
    Posts
    36
    that's the problem (probably) because of cPanel which set add-on domain as a subdomain of main domain.

    you can set up redirect from the subdomain to your add-on domain and you can set up canonical of your prefered domain (so that search engine knows which one is your prefered domain).
    Please don't assume everyone needs a control panel.

  8. #8
    Join Date
    Jun 2009
    Location
    UK: Oxford
    Posts
    1,259
    Sitemap, .htaccess and robots.txt Very quick, direct answers really but you could also submit your site to other Search Engines other then Google.
    Garbott Ltd - Exceptional web development, hosting & consultancy services

Similar Threads

  1. Any easy way to move a subdomain/addon domain to it's own cPanel account?
    By tnedator in forum Hosting Security and Technology
    Replies: 1
    Last Post: 01-29-2008, 11:30 PM
  2. Cpanel Subdomain and Addon domain Problem HELP!!!
    By CymraegWalesHosting in forum Hosting Software and Control Panels
    Replies: 1
    Last Post: 06-26-2007, 07:54 PM
  3. subdomain and addon domain
    By HD Fanatic in forum Hosting Security and Technology
    Replies: 4
    Last Post: 09-03-2006, 10:18 AM
  4. How to prevent redirect from addon domain to subdomain?
    By MH123 in forum Hosting Software and Control Panels
    Replies: 0
    Last Post: 02-25-2004, 05:24 AM
  5. AddOn Domain - Subdomain issues
    By HingyGuy in forum Hosting Security and Technology
    Replies: 3
    Last Post: 11-19-2002, 06:18 AM

Posting Permissions

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