Issue with Updating Metadata After Changing Site URL

#645165
  • Resolved Vikash Kumar
    Rank Math free

    Hello Rank Math Support Team,

    I hope this message finds you well. I’m reaching out regarding an issue I’ve encountered on my website, https://vikashkumarpal.com/, which uses a headless WordPress setup. Here’s a detailed overview:

    Setup Overview:

    1. The frontend of my website is developed using NextJs.
    2. The headless WordPress backend is hosted on a subdomain: https://admin.vikashkumarpal.com.
    3. I’m utilizing GraphQL for API integration.

    Issue Description:
    Everything functions as expected until I make a change in the WordPress dashboard settings for the site URL. Specifically, when I update the site URL to https://vikashkumarpal.com from its default setting. After making this change, I’m encountering a persistent issue:

    When attempting to update the metadata of any page or post, specifically the title, description, and OG data, the changes do not get saved upon clicking the update button. Instead, the system displays the old data.

    However, when I retain the site URL to its default, which matches the WordPress URL (https://admin.vikashkumarpal.com), all updates to metadata function perfectly.

    Primary Concern:
    Our intention behind changing the site URL from the subdomain (https://admin.vikashkumarpal.com) to the main domain (https://vikashkumarpal.com) is to ensure that the sitemap reflects the main site URLs rather than the subdomain URLs. We’re aiming to index the main site URLs, as our subdomain is merely for backend purposes and shouldn’t be indexed.

    Given this requirement, I’m seeking guidance on how to achieve seamless metadata updating while also having the desired URLs in the sitemap.

    I appreciate your time and assistance with this matter. Please let me know if you require any additional information or clarification to aid in troubleshooting.

    Best regards,

    Vikash

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for your query and we are so sorry about the trouble this must have caused.

    This is not possible to achieve with our plugin because we use the WordPress REST API to update the metadata and if you change the site address in the settings it will no longer ping the WordPress website when trying to update the metadata.

    Without the site address pointing to the WordPress installation the REST API is not available so this is a requirement.

    The only option we have for Headless integration is the generation of the metadata as mentioned in our tutorial here: https://rankmath.com/kb/headless-cms-support/

    Please note that we don’t support the GraphQL integration and that is supported by some developers not associated with our company.

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

The ticket ‘Issue with Updating Metadata After Changing Site URL’ is closed to new replies.