Hello,
I’m sorry to hear about the issue you’re facing with Google indexing query string parameters from your WordPress website. To prevent search engines from crawling or indexing query string parameters, you can follow these steps:
- Change Permalink Structure: Go to your WordPress dashboard, navigate to Settings → Permalinks, and select the “Post Name” option. This will make your URLs more spider-friendly and help prevent Google from indexing query strings.

- Ensure Search Engine Visibility: Check that the Discourage search engines from indexing this site option is unchecked in your WordPress dashboard under Settings → Reading. If this option is checked, it may lead to your website being marked as NoIndex.

By following these steps, you can help prevent search engines like Google from having an interest in URLs with query string parameters. If you need further assistance, feel free to reach out to our dedicated support team here.
Thank you for reaching out with your concern. Let me know if you need any more help!
Sources:
Why Google Hasn’t Indexed Your Post, Page, and/or Website? » Rank Math
Fix Excluded by NoIndex Tag – Google Search Console Status » Rank Math
Analyzing Your Site’s SEO with Rank Math’s SEO Analysis Tool
Can I NoIndex PDF Files Using an SEO Plugin? » Rank Math
How to Fix Submitted URL Marked ‘NoIndex’ Error » Rank Math
Hi,
All of them were done just when the site was created.
I don’t understand if these work.
Hello,
Thank you for contacting us and bringing your concern to our attention.
You can use the following filter on your website to set the pages to Noindex so that Google doesn’t index them on SERPs:
add_filter( 'rank_math/frontend/robots', function( $robots ) {
$url = home_url( $_SERVER['REQUEST_URI'] );
if( (strpos($url,'?utm_source=') !== false) ) {
$robots["index"] = 'noindex';
$robots["follow"] = 'nofollow';
}
return $robots;
});
Here’s how you can add filter/hook to your WordPress site: https://rankmath.com/kb/wordpress-hooks-actions-filters/
Alternatively, you can disallow bots from crawling these URLs from the robots.txt file at WordPress Dashboard > Rank Math > General Settings > Edit Robots.txt
User-Agent: *
Disallow: *?utm_source=*
Once done, give Google some time to recrawl your site to reflect the changes.
Hope that helps and please don’t hesitate to let us know if you have any other questions.
Thank you.
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.