Legitimate cloaking — real world example and php source code

It's been a while since I posted some juicy source code. This time, I am going to explain the infamous black hat technique known as cloaking with some basic PHP code.

While most people think of cloaking as evil (asking for search engines to penalize your site), there are circumstances where it is perfectly legitimate and reasonable to use it.

From Google quality guidelines:

Make pages for users, not for search engines. Don't deceive your users or present different content to search engines than you display to users, which is commonly referred to as "cloaking."

What is cloaking?
Read more

Dynamic Keyword Insertion for Landing Pages

One critical aspect of highly successful search marketing campaigns is making sure searchers find what they are looking for. I posted this before.

To accomplish this, we first need to grab the visitors’ attention, get them to click through our pages, and ensure that the pages’ content matches the search.

Whether you are doing SEO or PPC, it is imperative that your ads (title and description if SEO) include the search terms.

Advanced PPC management platforms (such as Adwords) provide a very useful feature for this purpose: Dynamic Keyword Insertion (DKI). The purpose of this feature is to help the advertiser create dynamic ads that include the queried keywords in the ad copy, automatically.

DKI works by creating a place holder text (ie.: {Widgets}) where you want the keywords to be included. A typical ad that says: “Buy Widget” will say the same, no matter what the user is searching for. Now, using DKI, for the ad: “Buy {Widget}”, the text inside the brackets, and the brackets will be replaced with whatever the users types in the search box. If he or she types “blue widgets”, the ad will say “Buy Blue Widgets”, etc. This is very useful. DKI can be used to replace all the text in an ad (the title, text and landing page). Jennifer Slegg wrote an interesting article on using DKI for changing the URL of the landing page in the PPC ad.

The point is that the closer the ad is to the search query, the more likely the visitor is going to click on it. In addition to this, Google highlights the keywords if they match the query. This helps a lot too.

Now, what happens when the visitor gets to the landing page? Well, chances are that the page will not include the exact keywords the visitor used to conduct the search; especially, if you are doing PPC. In order to fix this, I use a very simple technique: Read more

LinkingHood v0.1 alpha — Improve your PageRank distribution

As I promised to one of my readers, here is the first version of the code to mine log files for linking relationship information.

I named it LinkingHood as the intention is to take link juice from the rich to give to the poor linking sites.

I wrote it in Python for clarity ( I love Python :-) ) . I was working on an advanced approach involving matrices and linear algebra. After reading some of the feedback regarding the article, it gave birth to a new idea. To make it easier to explain, I decided to use a simpler approach . This code would definitely need to be rewritten to use matrices and linear algebraic operations. (More about that in a later post). For scalability to sites with 10,000 or more pages, this is primarily an illustration and does everything in memory. It’s also extremely inefficient in its current form.

I simply used a dictionary of sets. The keys are the internal pages and the sets are the list of links pointing to those pages. I tested it with my log file and included the results of a test-run.

Read more

The power of custom built software

One of the key things that helped me move quickly to super affiliate — I started earning 5 figures per month after six months — was the fact that I knew how to create scripts and systems to help me do the repetitive stuff.

I usually did everything manually first, and once I could see that the process was profitable, and that I could automate it, I focused on developing a custom software solution.  This gave me a huge competitive edge.

When I started, it was possible to get high rankings by trading enough links with the right anchor text; search engines are little bit smarter now.  I remember I created a handful of Perl scripts to research and find a lot of links, and an Internet Explorer toolbar to help me with filling the link exchange forms.  Those tools saved me a lot of time!

If you start doing something that is profitable and you think that automating it can help you grow faster; do it.  If you don’t have the skills to do it yourself; hire someone to do it. There are a lot of freelancers that can do it really cheap.