Search code examples
phpdebianapache2googlebot

AH00124: Request exceeded the limit of 10 on google-bot requests


My PHP error.log file has the following error

AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error.

After running sudo lnav /var/log/apache2/access.log /var/log/apache2/error.log it only happens when googlebot is trying to index website

└66.249.65.71 - - [16/Apr/2020:10:55:21 +0000] "GET /robots.txt HTTP/1.1" 500 6650 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"                                                                                                            │
◆[Thu Apr 16 10:55:21.577195 2020] [core:error] [pid 6512] [client 66.249.65.71:41736] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug│

I have search for possible solutions and most point to the .htaccess file

Header set Access-Control-Allow-Origin '*'
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

Don't know what i am missing !


Solution

  • I manage to solve the problem by tracing the problem by using

    LogLevel alert rewrite:trace3
    

    in my Apache 2.4 .conf file for my website

    I have a subdomain to host static cache content with no index file, when visiting the site Rewrite would go into an infinite loop even if file was not there. It was hard to detect in Apache log file due to the fact that it mimics your main domain

    "GET / HTTP/1.1" 
    

    The "/" was actually sub.example.com where it can also be example.com in the apache log file

    NOTE: of all the search engines that indexed my site only googlebot tries to index the subdomain