Top SEM and SEO Tips    

Fun with Google Translate

May 16, 2012 – 1:38 pm

Go to Google Translate;

Copy this text:

pv zk bschk pv zk pv bschk zk pv zk bschk pv zk pv bschk zk bschk pv bschk bschk pv kkkkkkkkkk bschk bschk bschk pv zk bschk pv zk pv bschk zk pv zk bschk pv zk pv bschk zk bschk pv bschk bschk pv kkkkkkkkkk bschk bschk bschk pv zk bschk pv zk pv bschk zk pv zk bschk pv zk pv bschk zk bschk pv bschk bschk pv kkkkkkkkkk bschk bschk bschk pv zk bschk pv zk pv bschk zk pv zk bschk pv zk pv bschk zk bschk pv bschk bschk pv kkkkkkkkkk bschk bschk bschk pv zk bschk pv zk pv bschk zk pv zk bschk pv zk pv bschk zk bschk pv bschk bschk pv kkkkkkkkkk bschk bschk bschk

Pick German as the “from” language; Press the “Listen” button.


Add review snippets to WP-Post Ratings

April 10, 2012 – 7:49 pm

Based off the schema at http://schema.org/AggregateRating adding rating numbers to your wordpress posts is a matter of changing the field ‘Ratings Vote Text:‘ on the Ratings Templates admin page to:

<div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating" style='display:inline;'>
%RATINGS_IMAGES_VOTE%
(<strong itemprop="reviewCount">%RATINGS_USERS%</strong> votes, average:
<strong itemprop="ratingValue">%RATINGS_AVERAGE%</strong> out of
<span itemprop="bestRating">%RATINGS_MAX%</span>)<br />%RATINGS_TEXT%
</div>

Once this is loaded use Google’s rich text snippet checking tool at http://www.google.com/webmasters/tools/richsnippets to test it


Migrating to Eclipse IDE – Importing Sites into Eclipse

March 30, 2012 – 11:44 am

I have been a big fan of the Dreamweaver IDE for many, many years and have still yet to find a better IDE integrated with FTP. I moved to Eclipse a year ago for a PHP project I was working on and found it really easy to use and the intellitype function definition help was so much better than that in Dreamweaver that I decided to  move to Eclipse full time.

I still prefer Dreamweaver for creating HTML (their WYSIWYG is awesome) and the FTP integration is superb but one of the reasons I moved was the version of Dreamweaver I was using didn’t handle SFTP well so I ended up using FileZilla for that anyway so the main reason to keep on Dreamweaver went away.

Eclipse PDT (with PHP extensions) can be downloaded at http://www.eclipse.org/pdt/downloads/

Once installed the biggest headache I found was getting the projects imported from Dreamweaver to Eclipse. So step by step:

Download the project to a local working folder (I use c:\workspace\hostprovider\<site url> but you can use anything).

In Eclipse go to File->New->Project  (do not use new PHP project)

On the ‘Select a Wizard’ page select ‘General->Project’ and click Next

On the next screen give it the project name and then un-check the ‘Use Default Location’ and set the local folder to the correct location and hit the finish button:

Then when the project is imported right click the project – select ‘Configure->Add PHP Support’

 

Which completes importing the PHP files into an Eclipse project.

 

 


Is it possible to kill a competitors website?

March 23, 2012 – 12:18 am

Yes. As seen with the recent Build My Rank fiasco you can buy BMR links and point them to your competitors sites and you will kill their site, and as they didn’t pay for them will not be able to remove the links, and won’t be able to file for reinclusion. Good bye competition, hello higher rankings!

Your mileage may vary. Don’t expect this to work for Wikipedia but it will for some smaller outfits.

Google has to address this as they have now created a huge loophole in their algorithms. There are several linking networks out there, BMR is just one. For a few hundred dollars you can kill a competitors site – let the mayhem commence.


How to Work Out Share of Voice

March 1, 2012 – 12:44 pm

Disclaimer – I wrote the Sycara Share of Voice system so there will be obvious bias.

One of the seemingly obvious questions in SEO is ‘who are my competition’. As the video says it should be obvious but it’s not always obvious. It also changes, for one set of terms your site might be in competition with companies a, b and c, for another set it might be x, y and z.

So how do you work out share of voice? For each keyword you grab the top 10 sites ranking and assign each position a certain number. You can assign linear numbers (position 1 = 10 points, position 2 = 9 points, etc) or based on click through rates (position 1 = 42 points (42% click through rate), position 2 = 16 points (16% CTR). Then you add up all the numbers and work out where your site is in relation to your competition, and it will also list all your competitions share of voice too.

All of this takes data collation takes time and effort, if you’re looking at hundreds of keywords it could take a long time. The Sycara SEO Tool automates this process and you can chop your keywords, keyword groups,  and weighting any way you like. You can decide you’re only interested in the top 5 for 10 keywords. The Sycara tool also handles that you might control multiple sites and will display both the individual and grouped visibility (which is why there are two blue lines in the video – the top one is all your sites added together, the second is the individual site).

If you’re interested in a demo contact Sycara.


Simple WordPress Contact Form 7 Phone Validation

February 14, 2012 – 4:52 pm

I looked around for a simple Contact Form 7 phone validation however all the solutions I found relied on hacking the Contact Form 7 code. By looking through the CF7 code I found a way to attach a simple function to the validation to allow custom validation of any input type you like

To plug into the Contact Form 7 validation there are some filters you can attach to. The built in validation functions do this so we’re copying the standard CF7 way of validation.

All of the code given here can be put into the functions.php file in your wordpress theme.


add_filter( 'wpcf7_validate_text', 'drc_wpcf7_validate_text' , 10, 2 );
add_filter( 'wpcf7_validate_text*', 'drc_wpcf7_validate_text' , 10, 2 );

This code attaches to two filter calls – one for a text field (wpcf7_validate_text) and one for a required text field (wpcf7_validate_text* – note the asterisk at the end).


function drc_wpcf7_validate_text( $result, $tag ) {
$type = $tag['type'];
$name = $tag['name'];
$value = $_POST[$name] ;

if ( strpos( $name , 'phone' ) !== false ){
$regex = '/^(?:1(?:[. -])?)?(?:\((?=\d{3}\)))?([2-9]\d{2})(?:(?<=\(\d{3})\))? ?(?:(?<=\d{3})[.-])?([2-9]\d{2})[. -]?(\d{4})(?: (?i:ext)\.? ?(\d{1,5}))?$/';
$Valid = preg_match($regex,  $value, $matches );
if ( $Valid > 0 ) {
$formatted = "($matches[1]) $matches[2]-$matches[3]";
if ($matches[4]) $formatted .= " x$matches[4]";
// Replace the value passed in with the cleaned up version.
$_POST[$name] = $formatted ;
}
else {
$result['valid'] = false;
$result['reason'][$name] = 'Phone field invalid';
}
}

return $result;
}

This simple routine gets called to validate all text fields in your form. The strpos looks for a field name containing ‘phone’ i.e. ‘your-phonenumber’ and will validate that. This is very simple to extend to Zip codes or any other text field you would like validated. By setting $result['valid'] to false we tell Contact Form 7 that the validation failed, the value you set for $result['reason'][$name] is the message that is displayed to the user of the site.


What to do if WordPress site just shows a blank page

February 7, 2012 – 3:01 pm

Sometimes a poor setup for wordpress can cause the site to return a blank screen. If you try accessing through /wp-admin/ and it still returns a blank screen then there are generally three causes:

  1. A broken .htaccess file
  2. A broken theme
  3. A plugin causing issues

Go through the following steps to fix this issue:

  1. Try removing the .htaccess in the root directory and see if the site works
  2. Remove the main theme directory (using FTP access) and see if the site works.
  3. If this fails turn off your plugins (by deleting them using FTP if you can’t get in through wp-admin) and again see if the site works.
  4. If these steps fail you will need to look at your site’s error log and see if anything is output there.Other causes I’ve seen are bad installations with missing files, unsupported versions of PHP/MySQL – your error log should tell you what is going wrong.

Once you have your site working you will need to take the following steps to put things back to normal:

  1. Through the wp-admin system save the Permalinks setup again (will recreate the .htaccess file)
  2. Look through the themes and ensure only those themes you are using exist on the site. I always leave the twenty-ten or twenty-eleven theme there too in case something happens to the main theme. If the theme caused the problem you will need to debug what went wrong – use your web server’s error log to look for php errors. If you can not debug yourself then switch to another theme.
  3. Look through the plugins and ensure only those plugins you are using exist on the site.

I would also harden your site – look for rouge directories in the root and in /wp-content – I once found one directory labeled backup that wasn’t a backup directory and that was obvious when the directory was opened. Remove unnecessary theme directories, remove unnecessary plugins. Ensure the WordPress software and plugins are up to date. Install ‘Bad Behavior’ which will block people trying to hack your forms.


WordPress Returns ‘Unknown Host’

January 16, 2012 – 3:20 pm

I wanted to park one of my domains on top of another and use the canonical feature of WordPress to redirect the inbound link equity from the one domain to the other domain however when setup the second domain always returned ‘Unknown host: xxxx.com’.

I know if this is default behavior however I had so many plugins on this server it is often hard to tell what comes from WordPress core and what comes from plugins. As this is a live site I didn’t want to turn off all plugins until I found the one creating the issue.

My solution was to use a .htaccess 301 redirect from one hostname to the other. This redirect happens before WordPress gets involved so all WordPress sees is the domain it thinks its running on.

RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.topsemtips\.com$
RewriteRule (.*) http://www.topsemtips.com/$1 [R=301,L]

This will redirect all requests to the domain www.topsemtips.com that do not use that as the host name (they might use topsemtips.com or xyz.com) to the same URL with the host name changed to www.topsemtips.com.


Google likes to push its own products

January 12, 2012 – 3:34 pm

Can’t stand this personalization kick they’ve been going on – the results I got back from one recent search where totally skewed in a way I didn’t want and didn’t ask for:

They know I shared the URLs so if Google wants to implement personalization they obviously don’t need me to join Google+ – this appears to be leveraging one product to hawk another which is what Microsoft kept doing (and kept getting fined for doing) with their Internet Explorer product. Hopefully Google will get investigated and fined – as they should be for this blatantly anti-competitive behavior by a monopoly in the search market.


WordPress Theme Scanning

January 12, 2012 – 3:18 pm

Noticed on one of our clients someone was trying to scan the theme directory looking for style.css files that might exist. I would imagine this is to find themes installed, and their version numbers which would then allow the person scanning to use a known exploit to break into a WordPress installation.

I caught this because I have the ‘Redirection’ plugin installed and set to log all accesses that result in a 404 error – usually I use this to put in redirects to stop the visitor getting a ‘page not found’ message. In this instance it has helped highlight someone trying to hack the site.

Sample redirection log:

Jan 7, 2012 ​/wp-content​/themes​/vibrantcms​/style.css 62.205.150.221
Jan 7, 2012 ​/wp-content​/themes​/thick​/style.css 94.244.60.171
Jan 7, 2012 ​/wp-content​/themes​/therapy​/style.css 117.203.9.147
Jan 7, 2012 ​/wp-content​/themes​/thejournal​/style.css 46.180.211.171
Jan 7, 2012 ​/wp-content​/themes​/suitandtie​/style.css 114.25.38.108
Jan 7, 2012 ​/wp-content​/themes​/sophisticatedfolio​/style.css 178.125.206.36
Jan 7, 2012 ​/wp-content​/themes​/slanted​/style.css 188.112.247.128
Jan 7, 2012 ​/wp-content​/themes​/royalle​/style.css 41.189.48.151
Jan 7, 2012 ​/wp-content​/themes​/retreat​/style.css 213.88.102.151

So to stop this I:

  • Installed ‘Bad Behavior’ plugin – this knows ways people try to hack your system and blocks them. Not sure if it would catch this scan attack but it catches other scanners so is always good to install.
  • Remove unnecessary themes. I always leave the current theme and one of the WordPress installed themes (Twenty Ten/Twenty Eleven) – this way if the main theme breaks for some reason there’s always a fallback theme and I know these two themes are supported and maintained by WordPress. All other themes including the earlier WordPress themes 1.5 and 1.6 are removed.