URl Base

#295606
  • Resolved Chris
    Rank Math free

    I am setting up a project with Cloudlflare load balancer in place.
    So basically
    http://www.main.url
    loads depending of visitor origin country from either
    us.main.url
    eu.main.url

    Is there a way to force both sites to use http://www.main.url for og URLS and all other Rankmath outputs it creates?

    Regards,

    Chris

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hello,

    Thank you for contacting Rank Math and bringing your concern to our attention.

    You can force the OpenGraph and meta tags of those versions of your site using these filters:

    https://rankmath.com/kb/filters-hooks-api-developer/#metadata
    https://rankmath.com/kb/filters-hooks-api-developer/#change-opengraph-url

    I hope that helps.

    Thank you, and please don’t hesitate to contact us anytime if you need further assistance with anything else.

    Chris
    Rank Math free

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hello,

    The filter returns the actual URL of the og:url tag. You can simply assign a value to the $url variable and it should change the og:url tag on the frontend.

    You can do it so like this:

    add_filter( 'rank_math/opengraph/url', function( $url ) {
    	$url = "https://google.com/";
    	return $url;
    });

    As for your sitemap issue, please follow the steps to flush the sitemap cache:

    1. Flush the Sitemap cache by following this video screencast:
    https://i.rankmath.com/pipRDp

    2. Exclude the Sitemap files of the Rank Math plugin in your caching plugin. The cache could be via a plugin or from the server. For plugins or Cloudflare, please follow this article:
    https://rankmath.com/kb/exclude-sitemaps-from-caching/

    Let us know how that goes. Looking forward to helping you.

    I tried that for the Sitemap but did not work.

    Any way to force RAnkmath to use a different base URL for the sitemaps?

    Chris
    Rank Math free

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Chris
    Rank Math free

    added some information to the private message section

    Hello,

    The base URL that we use for the sitemap is from calling the WP Rewrite class to get the website URL and whatever is returned there is added as the sitemap domain name.

    There’s no way to change that via filters and you can only add a base URL after that but the actual domain name.

    Hope this helps clarify your doubts.

    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 7 replies - 1 through 7 (of 7 total)

The ticket ‘URl Base’ is closed to new replies.