I was presented with the task of hiding telephone numbers from Google - what that means is, we want to display them on the website and have them clickable href="tel:..." but to ensure Google does not index it and does NOT display it with the search results.
Does anyone know of any effective technique?
I was thinking of writing VueJs component, which mixes given number with some alpha characters, but this would only work with the presentation / label, the tel:... would still have to have a valid telephone number and I'm not sure if Google wouldn't pick it form the href attribute.
I think the best approach is just to hide it from bots, may be you can use something like this VueIfBot
or any other alternative just check the
userAgentfor example in phpIf you can't get
userAgent, but you still want to check if this is a search engine crawler you can check user IP adress here is a list of IP Addresses of Search Engine SpidersAnd finally after you successfully hide your data you can test it with User-Agent Switcher