Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Disallowing a webpage with robots.txt doesn't work.

Featured Replies

Hi, so I'm kinda new to the robots.txt, but I learned a bit about it and i decided to give it a shot in order to optimize the crawl budget.

So I wanted my url with the end "/blog-home/" to not show up on the search page So I wrote this in the robots.txt file:

User-agent: *

Disallow: /wp-admin/

Disallow: /blog-home/

Allow: /wp-admin/admin-ajax.php

Then saved. Yet when I type site:mydomain.com the url with the /blog-home/ still shows up as a result. What did I do wrong? Maybe I just have to wait a little? (it's not even been an hour since I edited the .txt)

Edited by TrioWorks

You may have to wait until Google reindexes the site.

But even then, it will only work if there are no links to blog-home from anywhere else on the site.

You can’t disallow wp-admin and allow Ajax. That won’t work.

  • Author
3 hours ago, fisicx said:

You may have to wait until Google reindexes the site.

But even then, it will only work if there are no links to blog-home from anywhere else on the site.

You can’t disallow wp-admin and allow Ajax. That won’t work.

Is there a way to check whether there are links that direct to blog-home or not?

About Ajax - The guy below said at 1:43 that it's a wordpress thing and that we have to allow this link idk:

 

It's your site - you would know if there are any links to blog-home

If you want ajax to work you need to allow access to wp-admin. But that's a different thing to robots.txt.

robots.txt is about stopping google from indexing parts of the site. Google isn't going to index wp-admin as there is no indexable content. So no point in blocking anything.

Read this to understand how it works:

https://developers.google.com/search/docs/advanced/robots/intro

  • 3 weeks later...

This could be a possibility too:

This one is more common in websites that are more than a few years old. Google has stopped obeying noindex rules in robots.txt files as of September 1, 2019.

If your robots.txt file was created before that date, or contains noindex instructions, you’re likely to see those pages indexed in Google’s search results.

The solution to this problem is to implement an alternative ‘noindex’ method.

One option is the robots meta tag, which you can add to the head of any web page you want to prevent Google from indexing.

  • 3 weeks later...
  • Author
On 9/9/2022 at 5:04 PM, Allison Garner said:

This could be a possibility too:

This one is more common in websites that are more than a few years old. Google has stopped obeying noindex rules in robots.txt files as of September 1, 2019.

If your robots.txt file was created before that date, or contains noindex instructions, you’re likely to see those pages indexed in Google’s search results.

The solution to this problem is to implement an alternative ‘noindex’ method.

One option is the robots meta tag, which you can add to the head of any web page you want to prevent Google from indexing.

As I said, I'm new to robots.txt, so I didn't make the .txt prior september 2019. 

 

It's been over a month, and google still shows up /blog-home/. Does anyone know what should I do?

Are there any inbound links to any of the blog posts?

Have you disabled pings?

is there a reason why you don’t want the blog indexed?

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.