Duplicate meta / canonical tags

Well this was unexpected, I noted duplicate meta tags and canonicals on multiple of my sites. For reference I use RankMath which is doing its job just fine.


So for example im seeing the following;

I highlighted the double canonicals but there are multiple tags being set.

To verifiy it had nothing to do with some caching of sorts i tried a random. ?somecrapparam;

Which still shows the issue but skips over some caching related stuff.

So that started me thinking about what is causing issues.

After debugging for a bit with what was running in wp_head I saw this fired;

UiXpress\Rest\PostEditorSEO::output_seo_meta_tags

Not sure why that is running but disabling at all that solved my duplicate tags;

For now I have disabled it from running using;

add_action('template_redirect', function () {

remove_action(

'wp_head',

['UiXpress\Rest\PostEditorSEO', 'output_seo_meta_tags'],

1

);

});

It might be a simple compbality thing with RankMath but, please look into this as double tags are never a good thing when it comes to SEO in general.

Please authenticate to join the conversation.

Upvoters
Status

In Review

Board

πŸ› Bug Reports

Date

About 11 hours ago

Author

Subscribe to post

Get notified by email when there are changes.