This morning I found out that ebay has banned my site from getting any more credit for referring people to them because it uses the word ebay in it’s name. Man! What’s worse is that last night Google just increased it’s index of my site from 100 to 500! What this means is that I have to change the domain name and hope I can keep all of the indexed pages still there. I guess this is a good teaching opportunity, so here’s what I did, and I expect it to work out perfectly:

I bought Good keywords. I don’t really care about what humans think about the name because they don’t look at it anyways. No human is going to remember the name and come back to the site so it doesn’t matter to me. All that matters is that it has good keywords for google.
Then I put a little piece of code into the page that generates all of my pages that looks like this:

if(strpos($GLOBALS['HTTP_HOST'], 'ebay-stuff')){
header("HTTP/1.1 301 Moved Permanently");

It checks to see if the domain name contains the characters ‘ebay-stuff’ and if it does, it redirects to the exact same page on my new domain. There’s something more important here though, it’s the 301 redirect. A 301 redirect won’t get you punished by search engines like a meta redirect will. What a 301 redirect does is tells the search engine/browser/whoever is using the page that the page has been permanently moved. So what will happen hopefully is that google will go back to all of my pages that it’s already indexed and see they’ve been permanently moved to this other domain and hopefully they’ll switch their index.

I did this 301 redirect in php. It’s much more common to do it with a .htaccess file. All you have to do to do it with a .htaccess file is put:

redirect 301 /

or put

redirect 301 /path/to/page_to_redirect.html /path/to/new_page.php

The first one will redirect everything under the directory where you put the .htaccess file and the second one will just redirect the page_to_redirect.html file.

What made this whole situation even worse was that just this morning I had been getting links (like 25) from other sites to the site. It worried me at first that I’d lose them, but then I remembered the 301 redirect and how it’s search engine friendly. You shouldn’t lose pagerank with a 301 redirect because it just tells the search engine that the page moved permanently. There’s no trickery going on with a 301 redirect, like there could be from a meta redirect.