SEO for a Site that is Under Construction

label_outlinechat_bubble_outline Comment

In this article we’ll discuss how to use .htaccess redirects to solve SEO implications with new site development. All web developers and most users have come across the “under construction” page. Most of the time “the buck stops here” and the user leaves and comes back another time. What about those customers that are changing domains, or maybe you’ve setup a sub-domain for a new site in beta development. Should you give them the notorious “under construction” page as well?

Overview

From an SEO perspective I’d rather not provide search engines with an “Under Construction” page and here’s why:

1.) Having a Top level page with no internal linking from the start will pretty much put you on Google’s ignore list.
2.) Google will cache this page
3.) Per Google “We encounter a lot of problems with sites that return 200 (OK) result codes for server errors, downtime, bandwidth-overruns or for temporary placeholder pages (“Under Construction”).”
4.) There shouldn’t be a need to discuss further …

We have a couple options. We can use a 302 redirect to a main website in the case of a domain change or sub-domain and if we are creating a domain that can’t be linked elsewhere we can do a 503 with information on when the site will be available.

Using a 302 Redirect

For our first example we’ll show you how to do a 302 redirect using .htaccess. We’ll still allow the web developer and/or client into the website by allowing their IP’s.

Options +FollowSymlinks
RewriteEngine on
RewriteBase /
RewriteCond %{REMOTE_HOST} !^xxx\.xxx\.xxx\.xxx  
RewriteRule .? http://yourdomain.com [R=302,L]

The third line in the above example allows the IP address of whomever you’d like to bypass the redirect. You can duplicate this line as many times as you wish with additional IP addresses. The last line would trigger the 302 redirect and send the user to the domain of your choice.

Using a 503 Redirect

The second way of doing this involves a 503 redirect as in the example below. First lets edit the .htaccess file:

Options +FollowSymlinks
RewriteEngine on
RewriteBase /
RewriteCond %{REMOTE_HOST} !^xxx\.xxx\.xxx\.xxx  
RewriteCond %{REQUEST_URI} !^/error/503.php [NC]
RewriteRule .* /error/503.php

Then we must create a 503.php file in the /error/ directory of the website as follows:

<?php
ob_start();
header('HTTP/1.1 503 Service Temporarily Unavailable');
header('Retry-After: Fri, 10 Oct 2013 18:27:00 GMT');
?><!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>503 Service Temporarily Unavailable</title>
</head><body>
<h1>Service Temporarily Unavailable</h1>
<p>This website is currently under development. Please try again later.</p>
</body></html>

What we have done in the last example is create an .htaccess file that redirects the user to a 503 page. The page itself is excluded from the redirect as well as the user(s) IP. The second bit of code is the actual php file in charge of sending the 503. Change the date and time to the estimated availability of the new website.

If you’ve found this article helpful please consider commenting or sharing!

From all of us at WireFlare we ask that you help others find the answers they are looking for. Please leave a comment or share this post!

About

Blog Bio Picture For Todd

I'm the President of WireFlare. I have a passion for creativity, online business and internet security. I strive to create a community that empowers people to be themselves. I'm an adventurist, fun loving and caring. Find me hiking in places most people don't dare to go!

Get a free consultation today!