Prevent googlebot from indexing ajax popup pages links

hi all

how to prevent googlebot from indexing ajax popup pages ??

i have links in my php page like

<a href="http://domain.com/popup.php?id=1234">click</a>
<a href="http://domain.com/popup.php?id=1235">click</a>
<a href="http://domain.com/popup.php?id=1236">click</a>

google is indexing these pages

http://domain.com/popup.php?id=1234
http://domain.com/popup.php?id=1235
http://domain.com/popup.php?id=1236

how to prevent googlebot from indexing ajax popup pages ??

vineet

You can add the noindex meta tag to those pages.

See https://support.google.com/webmasters/answer/93710?hl=en

Hi TechnoBear

my popup.php page starts directly

<div id="popup">
content here
</div>

it doesnot have any
head opening and closing tags

so can i insert the meta “noindex” tag just before div start tag ??

vineet

Not as far as I know. In that case, your best bet would probably be to add nofollow to the link which triggers the pop-up. Provided they’re not linked to from elsewhere, that should work.

You should also be able to remove those pages already indexed via webmaster tools.

hi Technobear

what does above line means ??

vineet

It means it will work as long as all links pointing to that resource are marked as nofollow.

If another site chooses to link to it, it will still be found and indexed by that route. From what you’ve said, it sounds unlikely they could do that, but it’s a point to be aware of generally when using nofollow to prevent indexing.

Are the reported urls showing up in the Search Parameters section of Search Console? If they do show up, setting them as “representative URLs” should do the job. If they don’t show up there, consider blocking them using a robots.txt parameter.

As mentioned above with using nofollow links, blocking a URL in robots.txt won’t work if that resource is linked to from an external site:

Your robots.txt directives can’t prevent references to your URLs from other sites
While Google won’t crawl or index the content blocked by robots.txt, we might still find and index a disallowed URL from other places on the web. As a result, the URL address and, potentially, other publicly available information such as anchor text in links to the site can still appear in Google search results. You can stop your URL from appearing in Google Search results completely by using other URL blocking methods, such as password-protecting the files on your server or using the noindex meta tag or response header.

Again, it seems unlikely this would be an issue here, but it’s something to be aware of.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.