Reducing Page Load Times Dramatically Increased my Googlebot Crawl Rate

We’ve heard it many times before: Google loves fast loading websites. Towards the end of this past June, I completed a move of my site Wantbox from a Dreamhost shared server to a dedicated Linode virtual server.

I really like Dreamhost’s hosting service, their nice dashboard and great customer service, but Wantbox had grown beyond shared hosting. I needed an environment that I could fully control and could no longer tolerate the downtime caused by other sites on my shared server.

I chose to move to Linode because of the competitive price, the positive experience from some friends and the great Django/Apache/MySQL StackScript setup script by Filip.

Perceptually, I noticed that the pages seemed to be loading faster, and confirmed an approximate 35% page load improvement using WebPageTest.org.

Continue reading »

What a Google Penalty Looks Like

Google penalty logoMy site Wantbox (find someone for remodeling the bathroom) recently recovered from a sitewide Google algorithmic penalty. With Google, you never know for sure why you were penalized, but after reading a lot of posts, interacting with a few SEO experts and doing some thoughtful head scratching I made a bunch of changes to the site and waited it out.

In the end, I believe that Google felt I had too many links from my online birth announcement site into Wantbox. I removed most of the links and added “rel=nofollow” to the remaining ones. I admitted my error in a reconsideration request to Google (Google’s response to my request included below), documented specifically what I had done to fix the problem and waited it out.

Below is the graph of how the Google penalty played out. I wasn’t surprised by the 90-day duration of the penalty: I had read other reports of similar link-based actions. I didn’t expect, however, the gradual ramp-back of the the “penalty release” period. In all, it took about 4 months to get back to normal traffic.

What a Google penalty looks like
Source: Clicky Search Traffic (my favorite analytics service)

Continue reading »

Debugging Nginx and Django: Viewing HTTP headers in Google Chrome

It seems like every time I setup a new Django project, I spend an inordinate amount of time getting the site and admin media (IMG, CSS, JS) to display correctly in my templates.

It doesn’t help that I haven’t standardized on a best-practices Django layout. Dreamhost shared servers require one site structure while the Linode StackScript I use (thanks Filip) suggests another. A move from Django 1.2 to 1.3 hasn’t helped either.

On my home development environment (Debian in VirtualBox on Windows), I use Nginx to serve static media for my Django development server. Although this improves my dev server performance, it complicates the setup of a new environment.

Continue reading »

Getting Started with AJAX in Django: a Simple jQuery Approach

AJAX in Django using jQuery

AJAX in Django using jQuery

I recently created a side project to explore a few tech areas I wanted to learn more thoroughly. One of those areas was how to implement AJAX in Django using jQuery.

In a nutshell, the site, TruthTruthLie.me (update 3/5/2013: the site is temporarily offline as switch my Facebook Connect implementation from django-socialregistration to django-social-auth) presents three facts about you and challenges your friends to click on the one that is a lie.

When your friend clicks on a fact, I send the clicked fact_id via AJAX to a url. A Django url pattern routes the click to a view where I check what “type” the fact is, return the result via JSON to the client and update the page dynamically without a page refresh.

Continue reading »

Distilled Pro SEO Seminar: Day Two Recap

Pro SEO Seminar Boston Logo
Pro SEO Seminar Boston

Yesterday I attended day two of Distilled’s Pro SEO Seminar in Boston. Once again, the lineup of speakers was impressive and the tips, tricks and advice was mind-blowingly awesome.

I have so many notes, ideas and tests to try coming out of this conference that I’m looking into cloning myself as an SEO intern. We all saw how well that worked out for Michael Keaton’s character in Multipicity.

Similar to the Day One Pro SEO Seminar recap that I posted yesterday, as I track down the slides for each presentation I will link to them here.  If you attended, please feel free to leave updates in the comments and I will elevate them to the post if appropriate. Each presenter’s Twitter account is linked below. Follow them.

Continue reading »

Distilled Pro SEO Seminar: Day One Recap

Pro SEO Seminar Boston Logo

Pro SEO Seminar Boston

Today I took a break from working on my newly launched Django website TruthTruthlie.me to attend the first day of the Distilled Pro SEO Seminar in Boston.

After reading all the great feedback and presentations from Distilled’s Link Love conferences in London and New Orleans, I was thrilled when they announced that the traveling SEO circus would be rolling through Boston.

Day one didn’t disappoint, with great presentations from Rand Fishkin, Justin Briggs and half a dozen other excellent presenters. Since I am a primarily a web developer who happens to love SEO, I particularly enjoyed Will Critchlow’s presentation describing the tools, sites and APIs that he leverages to get the data he needs to excel at SEO. Very geeky and very powerful. Loved it.

@rebeccaslosberg's SEOmoz bot tattoo

SEOmoz bot tattoo

Apparently I wasn’t the most excited person to be there, however, as seminar attendee @RebeccaSlosberg expressed her undying love for Rand and SEOmoz by getting the SEOmoz bot tattooed on her shoulder. Yes, it is indeed a permanent outpouring of love for Roger.

Unfortunately, the merciless Boston traffic, exacerbated by a light rain and neverending construction, caused me to miss the first 20 minutes of the seminar. I did catch everything after that, however, and my notes are below.

Continue reading »

Simple CSS Layout Tip: Use a “debug” class

css_logoGetting the floats, widths, paddings and margins of your divs just right in a complex page layout can oftentimes be a huge PITA. If you aren’t using one of the many full-featured web developer browser extensions, one of my favorite quick CSS tricks is to create a “debug” class which lets me easily see the borders of my divs:

.debug { border:1px dashed red; }

This allows me to simply add “debug” to any div’s existing class list and see what is happening on the page. Example:

<div class="container debug">
<div class="main debug">blah, blah...</div>
<div class="nav debug">nav blah...</div>
</div>
<div class="footnote debug">blah, blah...</div>

Continue reading »

Solving “Caught TypeError while rendering: coercing to Unicode: need string or buffer”

hello-sirI’ve been working on a little side project in Django 1.3 and have run into a couple instances in the Django admin where I would get the error:

"Caught TypeError while rendering: coercing to Unicode: need string or buffer"

I did a little Bing-ing (my new default search engine — Google is too big, powerful and, dare I say, evil) and found the following solution from Ryan Brady.

For a Bing search of “django admin ‘Caught TypeError while rendering: coercing to Unicode: need string or buffer‘” there were only 4 results, but lucky for me, Ryan’s solved my problem.

Continue reading »

7 SEO Tips for your Django Site

“It is legal because I wish it.” – Louis XIV, France

Forget content. When it comes to the Internet, Google is king. If you please the king, you can do well.

If you cross the king, your disloyal ass will be thrown into the tower to watch your site wither and die, unless the king deigns to sets you free.

Some of the things that most please the king are “thick” (i.e. not “thin”) content pages, well structured site navigation, and honest links to and from your site.

In building my new site, Wantbox.com, I’ve both pleased and inadvertently crossed the king. The problem with this monarch: he doesn’t speak to his subjects, so if you end up in the tower, you’re never quite sure why.

Your best strategy is to know the rules of the kingdom, and do your best to follow them. Below are some of the best practice, white-hat SEO techniques that I have used to make sure the king stays happy.

Continue reading »

Basic Python Logging in Django 1.2: Debugging Made Simple

python-logWhen I was deploying my new social shopping site Wantbox a couple of month ago, I discovered that I couldn’t use the Django print command in my live Dreamhost (Passenger WSGI) environment like this:

   print "Hello world!"

As a new site, I was still debugging a few persistent nits and really needed to print out messages when certain areas of the code were accessed. A few sites recommended that I try the Django debug toolbar, but I was having trouble getting that to work reliably in my Dreamhost setup.

I searched around a bit more and after consuming many web pages, finally discovered a dead simple solution using the built-in Python logging module.

Continue reading »

Real Time Analytics