Hello,
We apologize for the issue you are facing with the GraphQL API returning nofollow
and noindex
meta tags on your posts, pages, and custom post types (CPTs).
Since you have enabled the "Discourage search engines from indexing this site" option in your WordPress settings, this is why you are seeing the noindex
meta tag in your GraphQL queries. This setting is intended to prevent search engines from indexing your site, which is why it affects the output of your API as well.
To resolve this issue while still preventing Google from indexing your backend pages, you can consider the following options:
-
Disable the "Discourage search engines from indexing this site" Option: If you want your front-end pages to be indexed, you will need to uncheck this option in Settings → Reading. However, this will allow search engines to index your entire site, including backend pages.
-
Use a Robots.txt File: Instead of using the setting to discourage indexing, you can manage indexing through your robots.txt
file. You can disallow specific paths (like your backend) while allowing others. You can edit your robots.txt
file in Rank Math by going to Rank Math SEO → General Settings → Edit Robots.txt. Here’s an example of how you might set it up:
User-agent: *
Disallow: /wp-admin/
Disallow: /wp-login.php
Allow: /
This way, you can keep your backend pages from being indexed while allowing your front-end content to be indexed.
-
Check Rank Math’s Titles & Meta Settings: Ensure that the noindex settings for your posts and pages are configured correctly in Rank Math SEO → Titles & Meta. You can set specific posts or pages to be indexed if they are currently set to noindex by default.

After making any changes, ensure to save them and check if the GraphQL API returns the desired meta tags.
If you need further assistance or if these suggestions do not resolve the issue, please reply to this ticket, and a human agent from the Rank Math Support team will assist you further.
Thank you for raising this concern!
Sources:
Why Google Hasn’t Indexed Your Post, Page, and/or Website? » Rank Math
How to Fix Submitted URL Marked ‘NoIndex’ Error » Rank Math
Fix Excluded by NoIndex Tag – Google Search Console Status » Rank Math
Hello,
Thank you for contacting Rank Math support and bringing your inquiry to us.
The only headless support we have for our plugin is referenced here: https://rankmath.com/kb/headless-cms-support/
We don’t have support for GraphQL built into the plugin natively, the open source repository you mentioned WP GraphQL Rank Math is not verified or supported by our team, but there seems to have been some good results from people using that.
Don’t hesitate to get in touch if you have any other questions.
Ok got it now I have deleted the “Wp Graphql Rank Math” plugin and following your Headless CMS approach but still issue is same if I enable “Discourage search engines from indexing this site” (Screenshot) from WordPress settings REST API response gives me nofollow,noindex robots meta.
Hello,
The backend needs to be set as noindex, and it won’t affect your frontend since you are using the headless API to generate the metadata from Rank Math which is a separate implementation of robots meta.
Since you are using Nuxt.js for your frontend, make sure you have rendered the head data from the JSON format generated by our headless API.
Looking forward to helping you.
But if i enable the “Discourage search engines from indexing this site” from WordPress settings page then it display nofollow,noindex robots meta on REST API.
Hello,
We apologize for the back and forth in this matter.
The implementation of our Headless CMS is very limited and it will simply extract the metadata from the page being queried but if you have set the backend website to be noindex
you would need to modify the metadata, in particular the robots meta settings to a different value in your frontend application.
The same would be true if you use the GraphQL implementation, which is community-driven so we cannot give any support with that particular one.
Essentially, this is the default behavior of the plugin and it cannot be changed at the moment, so the modifications need to be done on the frontend application.
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.