This question already has an answer here:

My website has links like:

<a href="messages.aspx">Messages<span>3</span></a>

Well google indexes these links as: Messages3

I have read some articles for preventing google from indexing some parts of the website like

<!--googleoff: index-->
<!--googleon: index>

tags but there are 2 problems:

1.This seems very odd to use lots of these tags and for a number

    <!--googleoff: index-->
    <!--googleon: index>

2.I want to know is there a way or a rule that would work for all search engines like bing and yahoo too.

marked as duplicate by Stephen Ostermiller Nov 19 '15 at 15:21

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    googleoff and googleon only works on Google Search Appliance, not normal search results, and for bing/yahoo nothing exists. You should also be aware that display results for users and different elements for search engines is a form of cloaking, which is obviously not permitted. You should tread carefully. It is however ok to hide content with authentication. – Simon Hayter Sep 30 '15 at 10:25

Best way is to use robots.txt. It works for all search engines.

As the content concerned:

Sometimes, there's a certain piece of content on a webpage (or a persistent piece of content throughout a site) that you'd prefer search engines didn't see. In this event, clever use of iframes can come in handy. The HTML Inline Frame Element () represents a nested browsing context, effectively embedding another HTML page into the current page.

For better understanding, here's the picture.

enter image description here

  • 1
    well, you didn't read the question well. I don't want to prevent a page from being indexed. I just want to leave some words, and numbers out. – Ashkan Mobayen Khiabani Sep 30 '15 at 10:13
  • 1
    aaa, sorry, I misunderstood. I'll add some edits (i'm using iframes for content), I'll write you down in a minute. – Josip Ivic Sep 30 '15 at 10:17
  • iframe works for all search engines too :) – Josip Ivic Sep 30 '15 at 10:24
  • So, is this what you're searching for? – Josip Ivic Sep 30 '15 at 13:56

Not the answer you're looking for? Browse other questions tagged or ask your own question.