Prevent subdomain listings?

Discussion in 'robots.txt' started by Mysmasken, May 28, 2007.

  1. #1
    Mysmasken, May 28, 2007 IP
  2. explorer

    explorer Well-Known Member

    Messages:
    463
    Likes Received:
    40
    Best Answers:
    0
    Trophy Points:
    110
    #2
    Not quite sure what you mean. Are you saying you've got a redirect in your .htaccess that redirects myseconddomain.com to myfirstdomain.com/myseconddomain/ but that you want search engines to list myseconddomain.com?
     
    explorer, May 30, 2007 IP
  3. Mysmasken

    Mysmasken Active Member

    Messages:
    247
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    58
    #3
    Sort of, but not quite.
    I don't have a .htaccess redirect, but I have the domain registered at godaddy.com and the host is at fxdomains.com
    So over at godaddy.com I have to type in fxdomains.com two nameservers, and at fxdomains.com I have to tell it to accept www.myseconddomain.com (which is hosted at godaddy.com) and show what is actually on www.myfirstdomain.com/myseconddomain.com

    So when I type in:
    www.myseconddomain.com
    and
    www.myfirstdomain.com/myseconddomain.com

    It will show the same things, but I only want the real domain name, the first one to be listed on searchengines, not the second one, where it's hosted.

    Gah, I'm making this sound more complicated than it is >_<
     
    Mysmasken, May 31, 2007 IP
  4. Jean-Luc

    Jean-Luc Peon

    Messages:
    601
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Hi,

    Just include this in robots.txt of myfirstdomain.com:
    User-agent: *
    Disallow: /myseconddomain.com
    
    Code (markup):
    Jean-Luc
     
    Jean-Luc, Jun 1, 2007 IP
  5. trichnosis

    trichnosis Prominent Member

    Messages:
    13,785
    Likes Received:
    333
    Best Answers:
    0
    Trophy Points:
    300
    #5
    you must the name of folders to your robots.txt file. if your second domain is inside the x folder, you must add

    Disallow: /x/$

    to your robots.txt
     
    trichnosis, Jun 8, 2007 IP