Hello,
Thank you for contacting Rank Math and bringing your concern to our attention. I’m sorry for any inconvenience this issue may have caused you.
In this case, you may need to add target="_self"
attribute inside <a>
tag for that domain URL which you don’t want to open in a new tab, by editing the block as HTML.
Here’s a screencast for your reference: https://i.rankmath.com/v/HnxOqr
Hope that helps.
Thank you.
Hey,
Thanks for the reply!
As the site editors aren’t too tech-savvy, I’d be glad to avoid instructing them editing the HTML – I’m certain they’ll mess it up.
Isn’t there a way for me, as a developer, to “teach” Rank Math that a bare domain is not considered external? Or set an override for opening external links in new tabs, for specific domains? I’m certain it’ll be helpful for subdomain setups.
Hello,
We don’t have any options in our plugin to update this with custom code. The only possible option would be to change the plugin files but those will get overridden with each update so that might not be ideal.
If you would like to change the files you can see the functions that control this under seo-by-rank-math\includes\frontend\class-link-attributes.php
Don’t hesitate to get in touch if you have any other questions.
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.