-
Hello Rank Math Support Team,
I hope this message finds you well. I am writing to report an issue with the Rank Math plugin’s schema module on my WordPress websites.
I have two WordPress websites installed on my main domain. The main website is accessible at http://www.mywebsite.com, and the second website is installed in a sub-directory, accessible at http://www.mywebsite.com/shop/. Both websites have the Rank Math plugin installed and activated.
The problem I am facing is with the schema on the second website (www.mywebsite.com/shop/). The schema is currently generating the sub-directory URL (www.mywebsite.com/shop/) instead of the main domain URL (www.mywebsite.com) in the @id and URL fields. This has the potential to confuse bots, as both websites should ideally have URLs from the main domain.
I am looking for a solution to change the sub-directory URL to the main domain URL in the @id and URL fields of the schema for the second website. I believe this might be achievable through PHP snippets.
Could you please provide guidance on how to address this issue? If there are any PHP snippets available to replace the sub-directory URL with the main domain URL in the schema, it would be greatly appreciated.
Thank you for your assistance in advance. I look forward to your prompt response.
Best regards
The ticket ‘Issue with Rank Math Schema on Sub-directory Website’ is closed to new replies.