What is the correct oembed provider base url for self-hosted wordpress sites

In order for oEmbeds to work when embedding another WordPress site, the single template must have discovery links enabled. WordPress uses these to retrieve the oEmbed endpoint where the content is retrieved. These endpoints are a part of the REST API, so make sure that’s enabled and working as well.

wp-includes/embed.php v5.1.1

if ( is_singular() ) {
    $output .= '<link rel="alternate" type="application/json+oembed" href="' . esc_url( get_oembed_endpoint_url( get_permalink() ) ) . '" />' . "\n";

    if ( class_exists( 'SimpleXMLElement' ) ) {
        $output .= '<link rel="alternate" type="text/xml+oembed" href="' . esc_url( get_oembed_endpoint_url( get_permalink(), 'xml' ) ) . '" />' . "\n";
    }
}

Here’s an example of that output:

<link rel="alternate" type="application/json+oembed" href="https://yourdomain.com/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fyourdomain.com%2F2019%2F04%2F12%2Fpost%2F">
<link rel="alternate" type="text/xml+oembed" href="https://yourdomain.com/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fyourdomain.com%2F2019%2F04%2F12%2Fpost%2F&amp;format=xml">