noindex is only for Yandex. Is there any universal method?
4 answers
Pictures are indexed no less than text.
You can make it asynchronously loadable automatically or at the request of the user (click). That is, after loading the page, run ajax request for a phone number. You can also put additional checks in js and on the server side.
The code itself is elementary. As an example:
// client $(function(){ $('#phone').load('/get_phone.php'); }); // server function isBot() { if ( !(isset($_COOKIE['какая-нибудь-кука']) && isset($_SERVER['HTTP_USER_AGENT'])) ) return true; return preg_match("/(bot|slurp|mail\.ru)/i", $_SERVER['HTTP_USER_AGENT']); } echo isBot()? '':'+7 (495) 224-22-22';
UPD:
@sergiks recalled another option. Obfuscate phone numbers and add them to the page through the same js included in the page itself.
- onean extra request to the web server, double the load, no ice. - Sergiks
- fourUh ... they are indexed, but the search engine will not conduct OCR pictures, it has nothing more to do. - VladD
- 2 method, i.e. For example, after each number, insert a letter, and then use js, for example, to cut out only numbers with a regular pattern? - Radik Kamalov
Here is the smallest known way to me:
CSS:
.phone { direction:rtl; text-align: left; unicode-bidi:bidi-override; }
the main minus of the solution is copied too.
another idea:
html:
<div class="phone">+1 555<p>что нить случайное</p>-9<p>и так несколько раз</p>9-345</div>
css:
.phone p { display: none; }
- fourwitty! Then you can: <style> i.tel_msk: after {content: "+ 7 (495)"} i.tel_office: after {content: "555-43-21"} </ style> <i class = "tel_msk "> </ i> <i class =" tel_office "> </ i> - office Example - Sergiks
Why not try to do it honestly? Put the contact information on a separate page (yoursite.org/contacts), and prohibit search engines from indexing it via robots.txt. A good, correct search engine will not enter if it is prohibited.
It is impossible to block from a malicious crowler: in the worst case, it emulates cookies and flash, renders the page into a picture and runs through it with a text recognizer, if that is the will of its creator.
- Those. extract from the database, for example, id and phone number. And from this page how? Regularly get the right number? - Radik Kamalov
- @ Radik Kamalov: And on this page, publish in clear text. - VladD
- Yandex recommends keeping contact details on every page of the site. - Sergiks
- oneOption + Shift + "minus" (I'm on a poppy). And on the PC, it seems, Alt + 151 (when pressing Alto, dial the numbers only on the numeric keypad on the right). - Sergiks 3:51 pm
- one@sergiks: I tried Alt + 0151 - it worked. Thank! On a poppy, somehow it comes out more human, does it make a custom layout for my windows? - VladD 4:03 pm
Banal obfuscation. The html body contains a packed version of an unreadable ololo, which is converted to a phone number by Javascript. A working example .
This source html is not useful for search engines:
<p>Наш телефон: <span class="figvam">dqcpmshuvwpnopq</span></p>
converted in the browser to:
<p>Наш телефон: <span class="figvam">+7(405)555-5555</span></p>
using this script (sketched out quickly)
(function(w,undefined){ var OBF = { offset: 57 ,range: 11 ,process: function( s, d){ var out = '',i; for(i=0;i<s.length;i++){ out += String.fromCharCode( s.charCodeAt(i) + d*this.offset + d*(i%this.range) ); }; return out; } ,encode: function(s){ return this.process(s, 1) } ,decode: function(s){ return this.process(s, -1) } }; w.OBF = OBF; })(window); var n = '+7 (495) 123-45-67'; // тест console.log( OBF.encode(n) ); // туда: dq[dqwtiasulgoqjtv console.log( OBF.decode( OBF.encode(n)) ); // сюда: +7 (495) 123-45-67
Here, each phone character is simply replaced by an ASCII table to the neighboring ones with a certain offset depending on the position of the character in the line.
- You can just simply multiply by n by 2 before output, and divide c by js by 2. - Radik Kamalov
- How will you multiply by 2 brackets and spaces? - Sergiks
- only the 10 - digit number is stored in the database - Radik Kamalov
- Even easier: display them in hexadecimal form, converting Javascript into decimal for the user-with-browser. 24CB016EA -> 9876543210 Javascript: telHex = '24CB016EA'; telDec = parseInt (telHex, 16); - Sergiks