+4 votes
200 views
by (40.6k points)

Error 503


1 Answer

+5 votes
by (40.6k points)

The first is that a 503 error is usually generated before a server overload, which means that there is a problem of indexing if at that time we are tracking the search engine robots.

So as you are putting things where the load times are critical is no question of having this kind of errors.

We can fix it in several ways:

Restricting entry to our website via an .htaccess file by banning the ip of robots that do not interest us to track us and we consume a lot of bandwidth because these robots are usually rather spend our robots.txt
Use robots.txt to as previously not allow the entry of these robots and let only track what we want, thus saving spent band width.
Disable feeds (not a good idea but you can do especially if you copied content)
Using different methods discussed above OPTIMIZE load times
But what really interests us is to work on this error so that google does not penalize us to meet him for what ought to include in your .htaccess file the following code that sends robots google to an error file 503 .php and tells him to come back in 3600 seconds while the user sends you to a 404 page:

Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_USER_AGENT} ^.*(Googlebot|Googlebot|Mediapartners|Adsbot|Feedfetcher)-?(Google|Image)? [NC]
RewriteCond %{REQUEST_URI} !^/cgi-bin/error/503\.php [NC]
RewriteRule .* /cgi-bin/error/503.php
RewriteCond %{REMOTE_HOST} !^1\.1\.1\.1
RewriteCond %{REQUEST_URI} !^/cgi-bin/error/404\.php [NC]
RewriteRule .* /under-development-explain.html [R=302,L]

If utilizais CGI ought to include this 503.php file to tell robots google it happen again in 3600 seconds, 1 hour.
<?php
ob_start();
header('HTTP/1.1 503 Service Temporarily Unavailable');
header('Status: 503 Service Temporarily Unavailable');
header('Retry-After: 3600');
header('X-Powered-By:');
?><!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>The server is temporarily unable to service your
request due to maintenance downtime or capacity
problems. Please try again later.</p>
</body></html>


6.5k questions

8.2k answers

191 comments

71 users

Please leave a comment if the solution works or not.
(with device model) [X]Close
Ask a Question
Welcome to Wikiwhy Q&A, where you can ask questions and receive answers from other members of the community.

Categories

...