Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have to take a website down for a month, which is the least intrusive way to keep achieved SEO optimizations?

should I just add in apache config:

<Directory /root-directory-of-web-site-to-be-redirected>
    Redirect 301 /  http://www.otherdomain.com/temporarily_offline.html
</Directory>

....

Reason for the long downtime: some misconfiguration in ruby, while all other php sites work fine. I will fix this after a month when I am back from hollidays

share|improve this question
6  
Since no one else has asked the question, I will: why do you need to take the website down for a month to do work on it? Why can't you do that work on your local server? –  DisgruntledGoat Apr 30 at 18:48
2  
May we ask what the problem is, as a month of extended downtime may be overkill, and severely hurts your company's presence in the market. –  E Carter Young Apr 30 at 22:35
    
@rubo77 I don't understand, what does holidays have to do with anything? Don't you have a working copy of the site on your own computer? –  DisgruntledGoat Apr 30 at 23:22
    
It is not so bad, it will be one month offline. It is not a company site, just some private project. I just thought, maybe there is a way to tell google to wait a month before the rank goes down, but it seems I will have to wait until the rank is restored then. But thanks for the concern. –  rubo77 Apr 30 at 23:46

2 Answers 2

If your website is down for a month, you will lose all your rankings and it may take you months to gain them back. I had a website go offline for about 3 months due to an issue with hosting. When I got it back online, it took nearly a full year to get back the rankings that it had once enjoyed.

The best idea I have to mitigate the damage would be to use the correct error status: 503 Service Temporarily Unavailable In conjunction with a Retry-After header to let bots know when it is coming back. See this article.

I would also use the error page to explain to users why the site is down, and when it is coming back.

Here is an example of how to implement these headers in your Apache config file using mod_rewrite:

ErrorDocument 503 /503.html
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/503.html$
Header always set Retry-After "Fri, 31 May 2014 12:00:00 GMT"
RewriteRule .* - [R=503]

You can check that it is working using the command line tool curl:

curl --head http://mysite.example.com/

Which should look something like this:

HTTP/1.1 503 Service Unavailable
Date: Thu, 01 May 2014 10:07:06 GMT
Server: Apache
Content-Length: 7590
Content-Type: text/html; charset=iso-8859-1
Retry-After: Fri, 31 May 2014 12:00:00 GMT
share|improve this answer
    
Found the answer here: serverfault.com/a/54019/128892 so in my case I would set Header always set Retry-After "Fri, 31 May 2014 12:00:00 GMT" –  rubo77 May 1 at 8:11
    
I found this SEO page where the author describes how to send such a header with PHP. And please add to your answer here how to send it by a <Directory> directive in the config in apache, and how I can verify that the header is correctly sent. –  rubo77 May 1 at 8:15
    
I think you cannot put Header in a <Directory> directive, I get this error: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration –  rubo77 May 1 at 22:58
    
You need mod_headers installed and enabled. sudo a2enmod headers on Debian and Ubuntu. –  Stephen Ostermiller May 2 at 1:34
    
That satifies apache. but now I get HTTP/1.1 500 Internal Server Error I guess because my 503.html is not reacheable. I thought, I put that at the right place inside the public folder in ruby. where do I have to put it in ruby –  rubo77 May 2 at 8:48

Use a 302 redirect instead 301

302 Redirect Means:

http://en.wikipedia.org/wiki/HTTP_302 - "The HTTP/1.0 specification (RFC 1945) defines this code, and gives it the description phrase "Moved Temporarily"."

However that doesn't mean you'll be able to keep your search engine placement. It just specifies that the content is moving for a set amount of time but will return to its previous location in the future. A 301 redirect means the content has moved permanently.

To keep your search engine placement, mirror your existing website to the new location so the search engines can still reference it while the real version of the site remains offline and you make the changes. Removing your site from the web for a month will likely result in a long term loss of ranking.

You could use a "503 - the server is temporarily unavailable" but a full month seems a bit long for that code. 503 is typically used when webmasters apply patches and upgrades.

share|improve this answer
2  
Or serve a 503. Although a months downtime should be avoided and I would have thought unnecessary. –  w3d Apr 30 at 17:15
    
I agree with at least replicating your site. Better yet, I use two servers and ping-pong the site from time to time as I do updates. This allows me to take advantage of significant improvements though the site remains in development. Google will see the changes repeatedly over a period of time and you will gain from the velocity created. If this does not fit your model, then replicate your site to keep downtime to a minimum while working on the new site. –  closetnoc Apr 30 at 17:43

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.