Information Security Stack Exchange is a question and answer site for information security professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If I display my email address on my website, I would probably receive a lot of spam, so I can set up a contact form instead. If I want to display my phone number, how can I prevent unwanted phone calls?

share|improve this question
You can trust the internet to be kind and not abuse your good intentions. – Terry Chia Jan 2 '13 at 2:23
If you feel you can't trust then purchase a sip configuration file and setup your own voip server using asterisk for example. You could then do a redirect with some voip antispam feature to avoid abuse. Sip configuration file cost about 50$ CAN and an asterisk server can run on a 20$ pentium 4 machine. If you wish to get a better encoding you can do so by purchasing a encoding licence to Digium. Those kind of config run smoothly even using 3g vpn as when setup properly the encoding can works great at as low as 100 kb/s. In other words, it could run over 3g in the back of your trunk lol – happy Jan 2 '13 at 2:35
Thanks, Happy Ninja. – Grafica Jan 2 '13 at 2:52

Well, the first thing is not to worry about it so much, because your threat model is unlikely.

Voice spammers don't get phone numbers by sending bots out to crawl the web, because they have much better sources of numbers.

And targeted attacks, where someone wants to prank call you specifically, can't be prevented because you can't tell who is an attacker and who is a customer.

If you still want to obscure your text, then here you can use similar techniques to those used to obscure email addresses:

  • Do the formatting weird so bots don't recognise it as a phone number.
  • Use an image of the number instead of the text. (But please don't do this, because it'll break accessibility.)
  • Shrug your shoulders and put good anti-spam in place.
share|improve this answer
+1 on this. You have no idea how often companies keep copies of the Experian credit database on USB sticks and the like. I can download a year-old copy of the UK one right now from a torrent, and it'd have ~20m home phone numbers in it, along with names and addresses. – Polynomial Jan 2 '13 at 13:01
I tend to make info like emails or phone numbers be displayed by javascript, after a short delay or click on the field. – Sebi Mar 22 at 21:20
Voice spammers don't get phone numbers by sending bots out to crawl the web, because they have much better sources of numbers. @GrahamHill Can you give an example for that? – toogley May 6 at 9:07

If you are in the US or Canada, you could use Google Voice (or any other VOIP service) and supply the Google Voice number. Google has pretty good anti-spam features built in to Voice and you can block any numbers that are problematic or only allow it to forward to your phone at certain hours.

share|improve this answer

Google Voice gives you, for free, an alternate phone number that you can (selectively) forward to other numbers. They also have a widget you can embed onto a webpage that can be used to call you directly from the page.

share|improve this answer

If you don't want to go through setting up your own asterisk server and routing SIP through it, there are plenty of VOIP options... Google Voice being one of them. I display my GV number on my website through an image to discourage any sort of web scraping shenanigans.

share|improve this answer

You can use the same methods that are used for e-mail adresses:

  • Replace with image (bad for accessibility)
  • Encode in some weird way (e.g. ROT13+Base64) and decode using JavaScript (prevents bots that cannot execute JS from reading it)
  • Require ReCaptcha to show (inconvenient)
  • Make hard to detect by inserting hidden text between the individual numbers

In addition to this, you can replace zeros with uppercase o's, however some scrapers can handle this (note that the scrapers I'm talking about are not used by spammers).

Honestly, I doubt phone spammers scrape web sites for numbers, much easier to simply dial all numbers and detect which ones exist.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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