Headless CMS question – How to link subdomain to real domain for SEO reports

#506584
  • Resolved Brady Kirkpatrick
    Rank Math free

    Hello! We are currently using WordPress as Headless CMS for our main site, thus WordPress is on a subdomain (wp.website.com).

    When running Rank Math reports and internal link reports, we are linking to our main site (website.com) instead of the subdomain, which WordPress is on (wp.website.com), and therefore the Rank Math score and internal link reports are not accurate.

    Is there a way to edit settings in WordPress so that our subdomain shows reports based on website.com instead of wp.website.com?

    I hope I explained this properly 🙂

Viewing 11 replies - 16 through 26 (of 26 total)
  • Hello,

    Can you please add the following code to your theme’s functions.php file:
    `
    add_filter( ‘rank_math/metabox/values’, function( $args ) {
    $args[‘parentDomain’] = ‘google.com’;
    return $args;
    }, 99 );
    `

    That should fix the issue you mentioned. I tried adding it from the admin panel, but looks like File editing from Dashboard is disabled on your site.

    I hope that helps.

    I added that code in, and it did NOT appear to solve the problem.

    I replaced Google.com with my domain (domain.com). I assume that’s what I was supposed to do.

    Any other ideas what might be causing issues?

    Hello,

    You have added the code inside of another filter function. Please add it at the end after }, 10, 2 );

    Or please share your site’s FTP access details, so we can add this code for you.

    Looking forward to helping you.

    I added after the 10,2. I put the code two lines below it…

    Still not working 🙁

    Hello,

    That should work.

    Can you please share your FTP details in the sensitive data section so we can take a closer look?

    We look forward to hearing back from you.

    I’m having trouble figuring out how to share FTP access inside WP. You can’t access it in the Theme File Editor?

    Can you see the screenshot I attached in sensitive files area?

    Thank you,

    Hello,

    We need the FTP so we could have full access to the website files. The FTP should help us troubleshoot the issue and it will also enable us to revert back your website to a working state whenever we encounter fatal errors while troubleshooting it.

    If you are not sure, you may ask for the FTP login from your hosting provider.

    Kindly provide the FTP credentials in the following format:

    Host:
    Username:
    Password:
    Port:

    Looking forward to helping you with this one.

    Hi Jeremy,

    I figured it out. Added info to sensitive data section.

    Hello,

    Thank you for sharing the FTP access. I have updated the code on your site and that seemed to have fixed the issue. Can you please confirm?

    I hope that helps.

    Awesome! It works great now… So if we link to domain.com links, it will be completely counted as Internal on Rank Math?

    For example, if we wish to have Open Same Tab for internal links, it will work for domain.com links too?

    Hello,

    The 2 filter code we shared was to make the main domain link internal in Content Analysis and Rank Math’s internal link count.

    To prevent the main domain from opening in a new tab, please keep the code that I had added on your site: https://support.rankmath.com/ticket/headless-cms-question-how-to-link-subdomain-to-real-domain-for-seo-reports/?view=all#post-516777

    We have already logged this as a bug and we’ll release an update soon. Till then, please keep the changes I did in src/helpers/class-url.php file.

    I hope that helps.

    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 11 replies - 16 through 26 (of 26 total)

The ticket ‘Headless CMS question – How to link subdomain to real domain for SEO reports’ is closed to new replies.