Beiträge von falkster

    Zusätzliche Frage, wenn ich eine eigenen robots.txt mache wie folgt. "Überschreibt" das die functions.php?

    User-agent: *
    Disallow: /wp-login.php
    Disallow: /wp-register.php
    Disallow: /wp-includes/
    Disallow: /wp-admin/


    User-agent: googlebot
    Disallow: /wp-content/
    Disallow: /wp-admin/
    Disallow: /index.php
    Disallow: /*?
    Disallow: /*.js$
    Disallow: /*.inc$
    Disallow: /*.css$


    User-agent: googlebot-image
    Disallow: /wp-includes/


    User-agent: mediapartners-google
    Disallow: /*?*
    Allow: /wp-content/
    Allow: /tag/
    Allow: /*.php$
    Allow: /*.js$
    Allow: /*.inc$
    Allow: /*.css$
    Allow: /*.gz$
    Allow: /*.cgi$
    Allow: /*.wmv$
    Allow: /*.cgi$
    Allow: /*.xhtml$
    Allow: /*.php*
    Allow: /*.gif$
    Allow: /*.jpg$
    Allow: /*.png$


    User-agent: ia_archiver
    Disallow: /


    User-agent: duggmirror
    Disallow: /

    Hallo Leute,

    Ich habe bei meinem Blog die robots.txt Datei während 2 Jahren aktiviert. Damit sie nicht indexiert wird.
    Jetzt möchte ich die Website öffentlich machen und habe die robots.txt deaktiviert.
    Trotzdem ist aber die robots in der functions.php immer noch vorhanden.

    Was muss ich am Code ändern, damit Google & Co nicht geblockt wird:

    Besten Dank für eure Hilfe

    }


    /**
    * Display the robots.txt file content.
    *
    * The echo content should be with usage of the permalinks or for creating the
    * robots.txt file.
    *
    * @since 2.1.0
    */
    function do_robots() {
    header( 'Content-Type: text/plain; charset=utf-8' );


    /**
    * Fires when displaying the robots.txt file.
    *
    * @since 2.1.0
    */
    do_action( 'do_robotstxt' );


    $output = "User-agent: *\n";
    $public = get_option( 'blog_public' );
    if ( '0' == $public ) {
    $output .= "Disallow: /\n";
    } else {
    $site_url = parse_url( site_url() );
    $path = ( !empty( $site_url['path'] ) ) ? $site_url['path'] : '';
    $output .= "Disallow: $path/wp-admin/\n";
    }


    /**
    * Filter the robots.txt output.
    *
    * @since 3.0.0
    *
    * Param string $output Robots.txt output.
    * Param bool $public Whether the site is considered "public".
    */
    echo apply_filters( 'robots_txt', $output, $public );
    }