Archive for the ‘Web development’ category

SEO: server downtime

October 21st, 2009

Say you need to move your web servers to new data center, or upgrade some hardware or perform any other task that requires to power off your web servers. Here’s a solution that is recommended by most SEO’s and Google:

Configure the server to return a status of 503 (network unavailable), you can also add the Retry-After response-header field to tell bots when to come back.

If you use PHP scripting language something like this should work:
<?php
header("HTTP/1.1 503 Service Temporarily Unavailable");
header("Status: 503 Service Temporarily Unavailable");
header("Retry-After: 3600");
php?>

Another thing – you shouldn’t use 301 (or any other) redirects. I mean if someone comes to yoursite.com/somepage.html this page should display the 503 not redirect to some yoursite.com/503.html page.

As for content you can show something like this:

<title>503 Service Temporarily Unavailable
<h1>Service Temporarily Unavailable</h1>
<p>Welcome to YourSite.com, we're currently under maintenance and will be offline until SOME DATE & TIME.
Please try again later.</p>

You can also add your logo or any other content you wish to show your visitors while your site is down.

Nice tutorial – how to setup Apache, PHP & MySQL on a Mac

October 11th, 2008

I recently bought a MacBook Pro and started learning and using MacOS X. At first it was quite wierd but the longer I use it the more I love it! Before this all my life I was a Windows user, I also have tried various other OS’es from time to time just of curiosity (various linux and *bsd distributions) but none of them was so good for me to replace windows, MacOS made it ;) It’s not that I do not like Windows XP – in fact I love it and use it on my old computer – through such a long time of working with Windows I have a really nice buch of various applications that make windows XP computer a very productive tool for me.

Anyway – as I have a Mac now, I wanted to make me a nice setup for web development which I still like to do when I have free time ;) I found this tutorial - it is really easy to understand and I highly recommend it for all people who want to save a lot of time on this task.