Register Your Website with Popular Directories, 2 of 25 SEO Tips

November 13th, 2008


Adding your website to industry-specific internet directories can be a bonus to your Google PageRank.

 

Google “*your industry* directory” and sign-up for the first results. They directories may offer a few different packages. Some packages will ask you to pay, to link to their site from your homepage, or link from any page on your site; with each choice bringing more value to your link on their site. The choice is yours, but I definitely prefer not to link to them from my homepage.

 

For web designers the simplest directories are:

 

DWDOW Directory - They will require that you post a link like this:

 

 Web Design Directory

 

 

WebDesigners-Directory is absolutely free, all you need is a linkback on any page of your website that looks like this:

 

Featured in the National
Website Design Directory


How to Make a Validated PHP E-mail Form

November 5th, 2008


If you want the code to add a validated form for users to fill out on your website, you’ve come to the right place.

 

There are a million solutions to this problem posted on the web, and I’ve found that many of them don’t work, like “mailto:youremail@example.com”, or the solution they offer is a paid service.

 

After spending hours one weekend reading a PHP book and patching code from others on the internet this is the optimal solution I use.

 

First, lets go over the PHP terms used in the code:

 

$example - variable “example”, in PHP variables are noted by a “$”

 

isset($example) -  determines if variable $example holds any data

 

!preg_match(’/@/i’,$example) - checks to see if an “@” sign is included in a text string. This will be used to check that someone has entered a valid e-mail address.

 

$howlong = strlen($REQUEST["example"]) - this will make a variable called “howlong” with a value equal to the number of characters in the “example” string.

 

This is sample PHP code that goes at the very top of the page’s code:

 

<?php 

 

$first = strlen($_REQUEST["firstname"]);

 

$second = $_REQUEST["email"];

 

$third = strlen($_REQUEST["msg"]);

 

$fourth = strlen($_REQUEST["subject"]);

 

$contactfor = $_REQUEST["msg"];

 

if (isset($second) && !preg_match(’/@/i’,$second)) {

$condition = TRUE;

} else {

$condition = FALSE;

}

 

if ($first >= 2 && $condition == FALSE && $third >= 5) {

 

$redirectpage = “index.html”;

 

$errorpage = “error.php”;

 

$to = “youremail@yourprovider.com”;

 

$lastname = $_POST['lastname'];

 

$replyTo = $_POST['email'];

 

$from = $_POST['firstname'] . ” ” . $_POST['lastname'];

 

$subject = “Referral”;

 

$message = stripslashes(”Name: ” . $from . “\n\n” . “Email: ” . $_POST['email'] . “\n\nPhone: “. $_POST['phone'] . “\n\n” . “Message: ” . $contactfor );

 

$ok = @mail($to, $subject, $message, $headers);

if ($ok) {

header(”Location: $redirectpage”);

} else {

header(”Location: $errorpage”);

}

} ?>

 

The is the code you need to add to your HTML form:

 

All the textboxes and the submit button for your form must go inside similar tags:

 

<form action=”" method=”post” name=”form1″ id=”form1″>

text boxes and submit buttons etc.

</form>

 
The reason the form action is “” is because the page will reload, and either deliver the message and move on to the $redirect page, or produce error messages next to the textboxes “first name is required.”

 

This is the code to add a textbox for the  ”subject” line of your e-mail:

 

<input name=”subject” type=”text” id=”subject”

            value=”<?php $subject = $_POST["subject"]; echo $subject; ?>” 

            size=”25″ maxlength=”40″/>

 
Change the word “subject” in the above code to whatever variable you would like to recieve from your users. The $subject is a variable that will draw the text from what someone enters in the “subject” textbox. “echo $subject;” is used for validation. If someone doesn’t fill out your form correctly the page will reload and the data they entered into the textboxes will still be there.

 

Finally, next to the textboxes put this code (customized to each field):

 

<?php

  if(isset($subject) && $fourth <= 2) {

  echo “<font color=’#FF0000′>Subject required.”;

}  ?>

 

If someone doesn’t fill out a text field, the message “subject (or whatever field you enter here) required” in red text.

 

Of course, save your code as a PHP file (.php), not .html!

 

There is quite a bit of code here and implemnting it may take considerable reflection on your part. If you have any questions or comments to improve the code, please let me know, I’d be happy to respond.

 

Visit our contact page if you want to see a live demo. Type in an e-mail address without a “@” or don’t fill out a required field and you’ll see the validation in action.


Make Your Website URL Keyword Rich, 1 of 25 SEO Tips

November 3rd, 2008


The URL you choose for your website will significantly affect your Google rankings.

 

Think about phrases people would search to find your service. If you are a florist in Boston, people might search “boston florist” and you want to be the owner of the url bostonflorist.com. If you have a drivers education company in Stamford, Connecticut, a popular search will be drivers ed in stamford, ct, so register DriversEdStamford.com. If you need help brianstorming keywords, use the keyword suggestion tool from wordtracker.

 

The results of keyword driven URLs are clear, here are some prime examples:

 

Broadway

Music

New York City law

Basketball

 

In all these instances (and these are just a small few) at least 8 out of the top 10 results have one of the keywords in their URL.

 

Of course your content has to support the keywords in your URL, and you need links to your site if you want to surface to the top of search terms.

 

A reasonable question you may have is why does Google care about website URLs?

 

Simply put, Google wants to know how commited you are to the keywords from your site. That’s why they look at HTML headers and title tags of pages. Your URL is the ultimate commitment your site can make to certain keywords, and Google gives you credit for it.

 

I am implementing this concept for a few of my clients, and I will post the results in the upcoming months on my blog. Stay tuned!