Web Development Information

Email Addresses in Web Pages


You want to give your site's visitors a way to contact you by email but don't want your emali address to be abused. Here are a few ways to protect your email address when building your website.

1. Use defined users and filters

Don't use the catch all email facility. Instead define users such as enquiry@ or sales@. It's better if you can avoid the most obvious ones like info@ as some people might speculatively try these. It's best to use a person's name which does not appear elsewhere on the site.

Most email providers or email software offer you filters to use on incoming email. You define a parameter in the email and then filter out any incoming mail which does not contain it. For example, you could set your email link as mailto:info@companyname.com?body=security%20code%20123%20 (please%20leave%20intact%20in%20message%20body) then filter out any mail which does not contain the text "security code 123". Please note that a space is replaced by "%20" ni the mailto parameter.

This will prevent email from automated systems but you could miss out on genuine mail if the sender fails to understand this measure. Be sure to explain it well on your contact page.

It is important when using filters on an address that you don't use this address to send other mail as your replies could be filtered out. Keep one address purely for email from your website.

2. Use a form

Use a form for your site's visitors to contact you. This hides the email address in the browser but it may still appear in the HTML coding. If it does yuo can get around this by defining a subject line, e.g. info@companyname.com?subject=enquiry and filtering out all incoming mail which does not have this subject line.

3. Use JavaScript for links

It is possible to write the text link in JavaScript instead of HTML. The script breaks the email address down into its elements and then puts it back together. It appears just as a normal HTML link in the browser even down to the way it appears in the browser's status bar. This method keeps everything looking as the visitor would expect but protects your address from Spam harvesters, programs designed to crawl sites and find mailto links in the code.

Copy this code replacing the 4 variables user, domain, extension and link with your own information. This example uses the made up email address info@companyname.com. It should be obvious which parts to change and to what.

[script language="JavaScript" type="text/javascript"][!--

var user = "info";
var domain = "companyname";
var extension = "com";
var link = "Email Us";

document.write('[a href="mailto:' + domain + '.' + extension + '"]'); document.write(link + '[/' + 'a]');
// --][/script]

Please note that the square brackets must be replaced with angled brackets for the script to work. The square brackets are merely to enable me to display the coding here.

Chris Smith is a full time web developer building websites for small businesses and individuals.

Please visit his site to see live examples of these techniques in action and for further information on web design and development.

Web Development | Email Links


MORE RESOURCES:

Sales & Marketing Technologies Opens New Tampa Internet Marketing ...
PR.com (press release), NY - 1 hour ago
The new office is an extension of the company’s ongoing expansion of its web development and Internet marketing services. The Tampa office will be headed up ...


Introduction to WEB4J: Web development for minimalists
Java World - Oct 9, 2008
By John O'Hanley, JavaWorld.com, 10/09/08 As Java Web application frameworks have become more powerful and flexible, they've also become more complex. ...


Altitude Marketing Bolsters Web Development Team
PR-USA.net (press release), Bulgaria - Oct 6, 2008
In May 2008, Altitude acquired Element Media, an innovative web development and Internet marketing firm and Kestrel Communications, a national public ...


RWW Live: Mobile Web Development
ReadWriteWeb, CA - Oct 6, 2008
The topic is Mobile Web Development and we have guests from Google and Microsoft joining us. You can tune into the show, and interact with us via the chat, ...


20 Places to Find Your Next Job
SitePoint, Australia - Oct 9, 2008
ReadWriteWeb’s job board tends to attract mostly web development job offers. Ajaxian Job Board - Ajaxian’s is a web developer heavy job board, ...


Director Web Development
CMSWire, CA - Oct 4, 2008
IDG Communications' Online Publishing Group is hiring a Director of Web Development. This position is a key member of the OPG's development organization and ...


Exciting tutorials on Web Development technologies to kick off ...
Siliconindia.com, India - Oct 2, 2008
The SmartTechie is organizing Web Development Technology Conference on October 4th in Bangalore. Drawing well-renowned thought-leaders, contributors, ...


Web Development Finally Meets Web Presence Management
PowerHomeBiz.com (press release) - Oct 3, 2008
Located in Montrose, CA BDG Software, Inc. is a web development company that also specializes in effective SEO and Internet PR/Marketing to deliver a full ...


Tempe Web Development Firm Gives Back to the Community
PR-CANADA.net (press release), Montenegro - Oct 2, 2008
Mountain Internet, a Tempe, Arizona web development company with a 13 year history, is taking requests from local non-profit organizations who desire ...


Prevent copy delays from holding up Web development projects
TechRepublic, KY - Sep 30, 2008
A number of aspects make text a particularly dicey part of the Web development equation. If a company is going through a rebranding or ...

Web-Development - Google News

home | site map
© 2006