In a website I'm working on I've set a 302 redirect with .htaccess for all IP but mine.
Now I want to test the site with the online tool of Google PageSpeed, but it's redirected. How can I do this?
Webmasters Stack Exchange is a question and answer site for pro webmasters. It only takes a minute to sign up.Sign up to join this community
You may temporally (during your checks) do not redirect for the usual Google IP range that is used by PageSpeed: 220.127.116.11/19.
But note that this will open your site to Google bots, so you also need to change your robots.txt file to disallow them:
Another approach would be to use some performance checker addon from your browser, like YSlow, rather than calling Google PageSpeed.
You can allow Google Page Speed Insights by its User Agent in your
SetEnvIfNoCase User-Agent .*Google Page Speed Insights* page_speed_insights Order deny,allow Deny from all Allow from 127.0.0.1 # your IP Allow from env=page_speed_insights