Welcome to Search Kingdom


Castles, keeps, moats... No, sadly we haven't got any of those, but we do have all the first hand knowledge you need to help your website to rank well in search engine results. No hype, no false promises, just clear advice, training or direct assistance to get your website found.

301 Redirects and Dynamic URLs

As a rule, changing any element of an established URL and URL structure on your site is a no no. I can’t think of any reason for this to be a good idea. However, sometimes this does become necessary.

I had an occasion today to change one of the URLs on one of my affiliate sites, buy bags, wallets, purses, luggage (shameless plug and keyword crazy anchor text… sorry). I noticed that in my link to Wheeled Luggage & Bags (sorry again, I will stop now) I had only put ‘wheeled’ in the query string and this was only bringing up about a third of the results that it could. So I needed to add ‘wheel’ to the query string too, which also meant that the URL would change.

The site hasn’t been up that long so it wasn’t an agonising decision to change the URL (if you are even thinking of changing a URL for a long established and search engine traffic generating page, think again). However, using the usual 301 redirect rule (redirect 301 /old/old.htm http://www.you.com/new.htm) in the .htaccess file didn’t work.

So, I had to do some digging around and realised I had to go deeper into mastering regular expressions (great article, but pour yourself a cup of tea first). After some playing I found that something like this worked:

RewriteCond %{QUERY_STRING} ^q=wheeled$
RewriteRule ^search6.php$ http://www.walletandpurse.co.uk/search6.php?q=wheel+wheeled [L,R=301]

As you can guess you can also use something like this to redirect a whole pile of dynamic URLs too (only for a fresh site though please!).

As a word of warning, please only play with this in a safe environment or with expert advice. Don’t mess with all this stuff unless you are completely sure of what you are doing. However, done correctly and in the right circumstances being able to redirect a pre-existing dynamic URL is a good tool to have in your armoury.

« « Previous post: Free Link Building Tip
Next post: Google’s Vince Update » »

3 Responses to “301 Redirects and Dynamic URLs”

  1. Hi Rob

    I’ve just had a butchers at your Wallet and Purse site, which is great, but I think Ive found me a bug.

    Contact sent.

    On the subject of the 301′s and mod rewrite:
    Not so sure I agree that it’s a bad thing to do on an established site. Yes, it can drop your serps once G picks up on it, but it picks back up again after a couple of weeks. Ive also found that when Ive been forced to do it to get rid of any duplicate/bad pages. Ive gone higher in the rankings once I’m back in.

    Cheers Rob!

  2. Rob Andrews says:

    Thanks for the steer on the error in the Wallet and Purse site. I forgot to upload a ‘noindex’ variation of one of the search pages, which meant it was 404ing. Thank you for the spot.

    I guess I should have clarified my thought on this subject a bit more. I am mainly thinking of ‘really’ established pages with a really clear link profile. Unless you are going to change all the back links (impossible) then you are at the whim of what weight Google is going to put on the redirect/PageRank/trust flow both now and in the future.

    I agree doing a url rewrite en-mass can be a good thing to do sometimes if the link weight is really well spread and the URL clean up will be keyword beneficial. By I have only seen a positive here if you do it early in the life cycle of the site.

    I appreciate the steer on W&P and the comment. Feel free to comment in the future you are most welcome.

  3. Bubber says:

    I found just what I was needed, and it was enrtetiainng!

Leave a Reply