How to keep a page from being indexed by Google

Posted in   Customer   on  May 17, 2025 by  Glasco Taylor0

✅ 1. Use “noindex” via an SEO Plugin (Best for Pages/Posts)

If you’re using a plugin like Yoast SEO or Rank Math, it’s easy:

🧩 With Yoast SEO:

  1. Edit the post or page.

  2. Scroll down to the Yoast SEO box.

  3. Click the “Advanced” tab (gear icon).

  4. Set “Allow search engines to show this Post in search results?” to “No”.

  5. Update the page.

🧩 With Rank Math:

  1. Edit the page or post.

  2. Scroll to the Rank Math SEO box.

  3. Click the Advanced tab.

  4. Set “Robots Meta” to “noindex”.

  5. Update the page.

🟢 This method keeps the page visible to users, but tells search engines not to index it.

✅ 2. Disallow URLs in robots.txt (Best for folders or custom paths)

If you want to block entire sections, edit your robots.txt file:

txtCopyEditUser-agent: *Disallow: /private-page/Disallow: /wp-content/uploads/drafts/

🔒 Be careful: this stops Google from crawling the page, but not necessarily from indexing it if other sites link to it. For true blocking, combine this with a noindex tag.

✅ 3. Set to “Private” or “Password Protected” (for Members-Only Pages)

In the WordPress editor:

  • In the Visibility section (under “Publish”), choose:

    • Private: Only admins/editors can see it

    • Password Protected: Only users with the password can access

🔐 Google won’t index private or password-protected content.

✅ 4. Use Custom Code (If No SEO Plugin)

Add this to the <head> section of your theme or via a plugin like “Insert Headers and Footers”:

htmlCopyEdit<meta name=”robots” content=”noindex, nofollow”>

⚠️ Only do this if you know how to edit your theme files safely.

✅ 5. Discourage Search Engines Site-Wide (Not Recommended for Live Sites)

Go to:Settings → Reading → Search Engine Visibility

✔️ Check the box: “Discourage search engines from indexing this site”

⚠️ Only use this if your site is under development. Google can still index parts of the site if other sites link to it.

About the Author Glasco Taylor

Glasco is the founder and CEO of Infestus SEO, a digital marketing agency specializing in Local SEO and web design solutions. Glasco's dedication to client success and a data-driven approach have fueled the company's growth. He specializes in creating conversion-focused websites for businesses and startups. Infestus Inc. is committed to helping businesses achieve their online visibility goals.