How to define what is an external domain?

#636781
  • Resolved Pasha Kagan
    Rank Math free

    Hello!
    I’m running a company WordPress blog off a subdomain, and I use Rank Math for SEO.
    We’re using the option to open external links in new tabs – however, the main site is being considered an external link, which is not a desired outcome.
    Meaning, when linking from blog.domain.com to domain.com/pricing – it opens in a new tab.
    How can I “teach” Rank Math that domain.com is “the same site”? Is there a functions.php tweak for that?

Viewing 3 replies - 1 through 3 (of 3 total)
  • 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.

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

The ticket ‘How to define what is an external domain?’ is closed to new replies.