Unable to remove Author from Page

#75799
  • Resolved David Aschenbrener
    Rank Math pro

    He guys, i’m having a small issue with the plugin in terms of removing the Author Schema from the page code that rank math is generating, no matter if i disable it in the settings.

    Please see sensitive info for details

    Your assistance is greatly appreciated

Viewing 5 replies - 1 through 5 (of 5 total)
  • I also removed any caching plugin from the page as well to ensure that wasn’t causing issues

    Hello,

    Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.

    The author is a required part of the article schema which is usually taken from the settings of the user who publishes the post. The URL you shared is a blog page whose schema is generated from the posts on the blog.

    You can check out these google document on structured data types: https://developers.google.com/search/docs/data-types/article

    Looking forward to helping you. Thank you.

    ​​​​​​​

    n/a

    • This reply was modified 4 years, 3 months ago by David Aschenbrener. Reason: answered my question on this

    And last is there any way to suppress the author url at least as this reveals the username if the author , and hence a way for hackers to hack away, which is what i’m trying to prevent

    Alberto
    Rank Math business

    Hello,

    That feature is more related to a security plugin than Rank Math, that is why it is not offered in the Rank Math plugin.

    But you can easily achieve it by adding the following code at the end of your functions.php file:

    if (!is_admin()) {
    	// default URL format
    	if (preg_match('/author=([0-9]*)/i', $_SERVER['QUERY_STRING'])) die();
    	add_filter('redirect_canonical', 'shapeSpace_check_enum', 10, 2);
    }
    function shapeSpace_check_enum($redirect, $request) {
    	// permalink URL format
    	if (preg_match('/\?author=([0-9]*)(\/*)/i', $request)) die();
    	else return $redirect;
    }

    It will just block the query ?author=NUMBER for being redirected to the /author/NAME so it will stop the user enumeration system.

    Looking forward to help you.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 5 replies - 1 through 5 (of 5 total)

The ticket ‘Unable to remove Author from Page’ is closed to new replies.