Let’s talk about one of the most common SEO mistakes I see people make – and yeah, I’ve done it too.
You notice that some random utility page like /thank-you or /cart is showing up in Google SERP page. Ugh.
You don’t want that. It’s not meant for search, it’s meant for users after they’ve taken an action. So, you think, “Alright, I’ll just block it in robots.txt and that’ll take care of it.”
Nope. That move can backfire hard. Here’s how you do it the right way – the SEO-safe way.
What is a Noindex Tag in WordPress?
Sometimes Google grabs pages you never intended to rank. Happens all the time. Stuff like /thank-you, /cart, or /login. These aren’t helpful in search results.

They’re just part of the site’s inner workings.
To fix it, we use the noindex tag. It’s basically like quietly telling Google:
“Hey, don’t show this page in the search results, but yeah – still crawl it if you want.”
In code, it looks like:
<meta name=”robots” content=”noindex, follow”>
This way, Google knows: “Okay, I see the page, but I’ll pretend it doesn’t exist in the index.”
Should You Use Robots.txt to Block Pages?
Short answer? Not yet.
That’s the mistake too many people make. They rush to block the page in robots.txt:
Disallow: /thank-you
And what happens? Google obeys. It doesn’t crawl the page.

But here’s the kicker – that also means it never sees the noindex tag inside.
So now the page stays indexed… forever. Awesome, right?
Blocking too early means Googlebot’s blind. So, if the page was already indexed, congrats – you just locked it in the index with no way out.
Best Way to Remove Indexed Pages in WordPress
I’ve done this a bunch of times. It works every time if you follow the right order. Here’s how I do it:
Step 1: Add Noindex Tag First
This is the first thing you should do – not blocking, not redirecting – just tell Google “Don’t index this anymore.”
Using Rank Math?
- Open the page in WordPress.
- Scroll down to the SEO settings.
- Go to “Advanced” tab → Turn on “No Index”.
Using Yoast?
- Edit the page.
- Scroll to the Yoast box → Click “Advanced”.
- Where it says “Allow search engines to show this page in results?”, pick “No”.
Boom. That’s your polite request to Google: “Hey, this doesn’t belong in your results.”
And because you haven’t blocked the crawl yet, Google can still get in and see the tag
Step 2: Let Google Visit the Page
Now – and this is key – you wait.
Google needs to come back, crawl the page, and notice that shiny little noindex tag.
If you’re in a hurry (aren’t we all?), go to Google Search Console:
- Use the URL Inspection Tool.
- Paste the page URL.
- Click “Request Indexing.”
Then just… wait. Usually takes 2–5 days. Sometimes longer. Google’s moody.
You can check the status by Googling:
site:yourdomain.com/thank-you
site:yourdomain.com/thank-you
If it disappears, you’re in the clear.
Step 3: Now Block It in Robots.txt (Optional)
Once Google has actually removed the page from the index, now you can block it.
Why? Because at this point, we don’t even want Google wasting time crawling it.
Add this to your robots.txt:
User-agent: *
Disallow: /thank-you
Now it’s fully locked down.
Google won’t crawl it again – and more importantly, it’s no longer in the index.
Just don’t do this step too early. Timing is everything.
Which Pages Should Be Noindexed in WordPress?
Not every page needs to rank. Some pages just live in the background.
Page Type | Should Use Noindex? | Why |
/thank-you, /cart | ✅ Yes | User-only pages, no SEO value |
/wp-login, /admin | ✅ Yes | Sensitive/private |
/search/?s=term | ✅ Yes | Thin, duplicate content |
/tag/, /category/ | ✅ Maybe | Only if low quality |
/page/2, /page/3 | ✅ Yes | Pagination ≠ SEO gold |
You get the idea. If it’s not helping your SEO – or worse, creating thin content or duplicate issues – just noindex it and move on.
Don’t Noindex These by Mistake!
This part’s important: don’t be reckless with noindex.
Some folks go wild and noindex entire blog sections, even homepages.
Don’t be that guy. If it’s supposed to bring traffic, keep it indexable.

Also, never enable that “Discourage search engines from indexing this site” option in WordPress unless your site is still in staging or you really know what you’re doing. That checkbox is dangerous if left on by mistake.
Bonus: Noindex with Code (If Needed)
If you’re more comfortable with code, or building a custom template, here’s a quick snippet to auto-inject a noindex tag on specific pages:
function add_noindex_to_pages() {
if (is_page(‘thank-you’) || is_page(‘checkout’)) {
echo ”;
}
}
add_action(‘wp_head’, ‘add_noindex_to_pages’);
Useful for developers or when you want control without using plugins.
Final Thoughts
Here’s the big takeaway:
Don’t block before you noindex.
Seriously. That one mistake causes pages to stay in Google forever, and you won’t even realize until it’s too late.
Instead:
- Add the noindex tag.
- Wait for Google to drop it.
- Then block it, if you really need to.
Simple, clean, and safe.
It’s one of those things that once you screw it up, you never forget. And once you get it right, you’ll wonder why everyone else is still getting it wrong.