Lots of queries to matomo.php - http 307


I use Matomo for tracking visits coming from a wordpress website.
When I include my ip adress for tracking, it seem working well: I can se my visits.

But when I try a website speed test with gtmetrix, or uptrends, I can see lots (about 20) queries to matomo.php, all with the http code 307.
Query is like this:


Does anyone has an idea to solve this behavior ?

Thanks a lot in advance.


307 is a Temporary Redirect. Matomo should never respond with a redirect to a tracking request, so I assume this is caused by some configuration of your webserver. Maybe there is a .htaccess file in or above the Matomo directory with a rule that incorrectly redirects the request to itself.

Hi Lukas,

Thanks a lot for your answer.
Root directory was just containing an empty .htaccess
Strange, because I’ve been using Matomo for 2 or 3 years and I did not notice this.
So I put this into:

<Files "*">
        # Allow localhost IPv4
        Require ip
        # Allow HTTP API
        Require ip IP-OF-MATOMO-SERVER
        # Allow admin IP
        Require ip MY-PERSONAL-IP

# Allow public access to basic Matomo files
<FilesMatch "(^piwik\.(php|js)|^matomo\.(php|js)|^container_.*\.js|robots\.txt|optOut.js)">
        Require all granted

And, perhaps it’s not a good idea: as matomo.php is redirecting towards piwik.php, I remane it for saving it, and in matomo.php, I put the content of piwik.php.

Utrends, which was seeing 22 queries towards matomo server (all with 307 http code), is only seeing 2 now, and no 307. Good
But other services for testing web page are still seeing redirections (gtmetrix for example).

Do you think It could be caused by “the source” (the wordpress website) and not related to matomo server?

Well, I will going on to search. Thanks again.

Have a good day.


You should need neither as Matomo provides both the matomo.php and the piwik.php file. And any file you modify will be overwritten on the next update.