• Resolved jrgalia

    (@jrgalia)


    We have error in robots.txt because of the rules added by the plugin

    User-agent: *
    Error: Multiple 'User-agent: *' rules found. Only one rule of this type is allowed

    We added custom robots.txt in our SEO plugin but the line above keeps added.

    How to temporarily disable the plugin in adding those lines? So that we can fix the robots.txt.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Support vupdraft

    (@vupdraft)

    Add the following to your theme’s functions.php file

    add_action('after_setup_theme', 'ab123_remove_robots_txt_entry');
    function ab123_remove_robots_txt_entry() {
    	if (function_exists('WP_Optimize')) {	
    		remove_filter('robots_txt', array(WP_Optimize(), 'robots_txt'), 99, 1);
    	}
    }
Viewing 1 replies (of 1 total)

The topic ‘robots.txt Error Multiple User-agent rules found.’ is closed to new replies.