Move your WordPress blog to a new domain in 10 steps!

A friend recently asked me how to move his blog, which is on /blog/ on his domain, to a new domain on it’s own. The steps are easy, but have to be taken in the right order to make sure you’re not annoying your users and the search engines: Put up a robots.txt on the [...]

Playing with the X-Robots-Tag HTTP header

Ever since the announcement on the Google Blog and more recently Yahoo’s announcement that they’ve enhanced their support for it, I’ve been meaning to play with the X-Robots-Tag header. This HTTP header allows you to do what you’d normally do in a robots meta tag, in an HTTP header, which has some pretty cool appliances. [...]

Tags: , ,
Categories: SEO

How to remove www from your URL with mod_rewrite

I got a hit today for the following search query: how do you get rid of the www in url. As you can see that hits on my article about removing PHPSESSID’s, which isn’t quite what the person was looking for I guess. Here’s the code to 301 redirect the www version of your site [...]

Tags:
Categories: SEO, Serverside

Implementing a sitewide search function

Those of you coming to this site more often might have noticed a small change in the search box. It’s now implemented sitewide, and I’ve built a sitewide search functions using the Yahoo! API. It was quite nescessary because I found that people were searching for “sortable.zip” on the blog, and they wouldn’t find anything [...]

PHP 301 redirects for Apache and IIS

This one is just here for my own reference, because the default 302 status code just isn’t good enough! PHP 301 for Apache: header(“HTTP/1.1 301 Moved Permanently”); header(“Location: http://www.example.com/newpage/”); exit; PHP 301 for IIS: header(“Status: 301 Moved Permanently”); header(“Location: http://www.example.com/newpage/”); exit;

Convert underscores to dashes with Apache mod_rewrite

Update: (Aug 4 2007) the stuff below is no longer necessary, all major search engines now treat underscores and dashes exactly the same, as word separators! A year or so back, I was using underscores in my URL’s on this site for spaces, and I decided to switch them to dashes, since several people, including [...]

Tags:
Categories: Serverside

Trailing double forward slashes in URL’s in the SERPs…

This query gives a result I hadn’t seen before (image), the same page was indexed with both a single trailing forward slash, which is of course normal, and with a double trailing forward slash… This is of course a duplicate content issue, especially when people link to the double slash one by accident. The fix [...]

Tags:
Categories: Serverside

Changing your permalink structure

I recently changed the permalink structure of this WordPress blog, going from /%year%/%monthnum%/%day%/%postname%/ (WordPress default i think) to the much more elegant and simple /%postname%/. This is very cool ofcourse, both because it’s simpler and SEO wise, but on an existing blog, this leaves you with lots of links that point to the wrong URL. [...]