[wp-trac] [WordPress Trac] #53016: Robots API

WordPress Trac noreply at wordpress.org
Sat Apr 10 12:41:58 UTC 2021


#53016: Robots API
--------------------------+-------------------------------------------
 Reporter:  kraevit       |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Sitemaps      |    Version:  5.7
 Severity:  normal        |   Keywords:  has-screenshots needs-testing
  Focuses:                |
--------------------------+-------------------------------------------
 Hello,
 My name is Krasimir Kraev, I have frustrating issue with my wordpress
 installation version 5.7 using yoast seo plugin. My google search console
 reported that i have 1600 invalid url's due to having "noindex" in the
 <meta robots tag> of my pages/posts. Everything in the admin panel is set
 correctly(eg settings reading). I found that in this particular file of
 wordpress core files - /wp-includes/robots-template.php in the lines from
 153-165 there is a function:
 function wp_robots_no_robots( array $robots ) {

     // $robots['noindex'] = true;  THIS DEFAULT LINE COUSING ISSUES
 INDEXING MY PAGES ON GOOGLE SEARCH CONSOLE so i changed to false
     $robots['noindex'] = false;

         if ( get_option( 'blog_public' ) ) {
                 $robots['follow'] = true;
         } else {
                 $robots['nofollow'] = true;
         }

         return $robots;
 }

 Is this a bug or it is a normal wordpress 5.7 behavior?

 Please respond.

 website: https://webnavigator.bg
 template: Listify 2.13.7
 yoast seo 16.1.1

 Regards!

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/53016>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list