Mobile app version of vmapp.org
Login or Join
Samaraweera270

: How to make Google ignore an element on a page (without using HTML comments)? I would like to make Google ignore a div containing functional buttons and action titles, which I've seem come

@Samaraweera270

Posted in: #GoogleSearch #Indexing #Seo

I would like to make Google ignore a div containing functional buttons and action titles, which I've seem come up in search engine results.

Now I know about <!-- googleoff: index --> tags, however, I can't use them because all pages are compressed (comments, whitespaces removed) before they're output.

Is there any alternative? Perhaps there is a Microdata solution to show that the div does not contain information about an entity (product in this case, button are "Add to Cart", etc.).

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Samaraweera270

2 Comments

Sorted by latest first Latest Oldest Best

 

@LarsenBagley505

Or another way is to create a empty div tag and populate the content of the div via javascript/jquery.

document.getElementbyid('divid').innerhtml.value = "bla bla bla"


The code's syntax may not be correct but the idea will work. Bots dont pick JavaScript dynamic values. You can call a function on page load and use the above code to populate your

Bascially, such a will be empty when you 'view source' the page.

10% popularity Vote Up Vote Down


 

@Heady270

First on: googleoff works only in google custom search appliance.

for your goal there are only pretty limited possibilities:


instead of div you can put your content from the div into an image (button as an imagemap link)
another way is to encode the content with base64 and to hide then the decoding javascript from Google
you can load the div content from an external file with an iframe. The external file should be noindex-ed.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme