Robots.txt Question

Discussion in 'Search Engine Optimization' started by sherone, Apr 9, 2009.

  1. #1
    I worked with a new domain and promoted it within one month. Now some keywords are in top 10. But now my client want redirect the traffice from another domain. I checked that domain its affected by virus.

    Client want all traffice to his old domain(virus affected) from (www.newdomain.com to www.olddomain.com). What will I do with my client?
    I made robots.txt like this.

    user agent*

    disallow: http://www.olddomain.com

    is it a right way to avoid crawler from the virus affected domain?
    Please suggest me.
    Thx
     
    sherone, Apr 9, 2009 IP
  2. ColeenB

    ColeenB Peon

    Messages:
    123
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If you want to redirect the traffic (and the page rank) from the old domain to the new, your htaccess file should look like this:

    Options +FollowSymlinks
    RewriteEngine on
    rewritecond %{http_host} ^olddomain.com [nc]
    rewriterule ^(.*)$ http://www.newdomain.com/$1 [r=301,nc]



    I don't know what to do about the virus, though.
     
    ColeenB, Apr 9, 2009 IP
  3. jitendraag

    jitendraag Notable Member

    Messages:
    3,982
    Likes Received:
    324
    Best Answers:
    1
    Trophy Points:
    270
    #3
    If the old domain is virus infected, you might want to remove the infection and get the old site reincluded. You can use google webmaster tools to remove the site from index.

    You are not using the robots.txt in correct manner.

    
    User-Agent: *
    Disallow: /
    
    Code (markup):
    The above code will ensure your pages are not indexed. This should be put on root of domain that you do not want to get indexed.
     
    jitendraag, Apr 9, 2009 IP
  4. Irfi0009

    Irfi0009 Banned

    Messages:
    17,584
    Likes Received:
    33
    Best Answers:
    1
    Trophy Points:
    48
    #4
    redirect you old domain to new domain...
     
    Irfi0009, Apr 10, 2009 IP