GTmetrix Performance Blog

News, updates and guides on GTmetrix and general web performance

Anonymizing Your User-Agent

We explain why you may need to anonymize our default User-Agent and how to do it.


 

Overview

GTmetrix’s current default User-Agent (as of May 15, 2024) is:

Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36 GTmetrix

You’ll notice that the User-Agent string contains the “GTmetrix” tag at the end. Sometimes, you may not want to have the trailing “GTmetrix” tag in the User-Agent string.

We explain why this may be the case and how you can anonymize the User-Agent (i.e., remove the “GTmetrix” tag).


 


Why Would I Want to Anonymize the User-Agent?

The User-Agent is an identifier that represents a user (e.g., a browser, device, etc.) within the context of the internet and/or web performance.
 

The User-Agent is a header that acts as an identifier and tells your server who is trying to access your site.

 
It’s a header that tells your server who is trying to access your site. Depending on the User-Agent, your server may provide different content (e.g., desktop/mobile site, different image formats for different browser versions, etc.).

There are multiple reasons why you may want to anonymize the User-Agent:

  • Your website/application may be displaying different content:
    • Your website may have code running that identifies a GTmetrix visit based on our default User-Agent and serves different content.
    • This could also result in your GTmetrix results being very different.
    • Anonymizing the User-Agent (i.e., removing the “GTmetrix” tag) will allow the GTmetrix visit to be similar to any other user visiting your browser, so the results would more closely match what any user would experience in the real world.
  • Your website/application may be blocking GTmetrix:
    • This could be done through User-Agent detection, resulting in a 403 error.
    • Anonymizing the User-Agent prevents your server from identifying GTmetrix and could help generate a GTmetrix Report.
    • Note that your server could also block GTmetrix based on IP addresses. If this is the case, you may need to allow GTmetrix IP addresses to pass through whatever firewall or filters you may have.
  • You want GTmetrix to present itself as an anonymous user:
    • This may be done to ensure there is no possible contamination of GTmetrix test results that may otherwise potentially arise through User-Agent detection.
    • Again, anonymizing the User-Agent will allow the GTmetrix visit to be similar to any other user visiting your browser, better reflecting a real user’s experience.

 


 

Note on Keeping the GTmetrix tag in the User-Agent

The “GTmetrix” tag in our browser’s User-Agent string is detected by some services to whitelist our tests.

Many websites and services have spam protection or other safeguards against bots and other services (e.g., Google, Amazon), and we’re on the Cloudflare verified bots list, which enables us to safely bypass them.

Even though we do provide the option to anonymize our User-Agent, we don’t recommend doing it unless you specifically need to.

 


 

How to Anonymize the User-Agent

The method to anonymize the GTmetrix User-Agent differs for Basic/Free and PRO users.
 


 

Basic/Free Users

Basic/Free users can easily anonymize the User-Agent from the Dashboard or in the Page Settings.

On the GTmetrix Dashboard, expand the Analysis Options and you’ll see the User-Agent Preview in the Test Format section. You’ll notice the default User-Agent with the “GTmetrix” tag at the end of the string.
 

The User-Agent preview is shown in the Test Format section.

 
In the Options section, enable the Anonymize User-Agent option.
 
Enable the Anonymize User-Agent option to remove the trailing “GTmetrix” from the User-Agent string.

 
You’ll notice that the User-Agent preview no longer shows the “GTmetrix” tag. You can now analyze your page with the anonymous User-Agent.

Note that you can also enable the Anonymize User-Agent option from the Page Settings of an existing GTmetrix Report.
 

You can enable the Anonymize User-Agent option in the GTmetrix Report’s Page Settings.

Make sure you click on Save Settings before you Re-Test the page.
 


 

PRO Users

PRO users can customize the User-Agent string so that GTmetrix will present itself as your chosen device/browser.

Under Advanced Options (available both on the Dashboard and in Page Settings), navigate to the User-Agent Override area and you can use the “Device” preset to change the User-Agent string to whatever device (i.e., Desktop/iPhone/Samsung Galaxy, etc.) you are testing with.
 

Use the Device preset to add the device’s User-Agent string without the trailing “GTmetrix” tag.

 
You’ll notice that the “GTmetrix” tag is not present at the end of the User-Agent string.

We’ve written a detailed guide on customizing the User-Agent in GTmetrix.

 


 

Summary

Our default User-Agent contains the “GTmetrix” tag, which enables us to be a trusted, verified service in the eyes of many websites and services on the internet.

However, there may be specific scenarios where you may want to remove the “GTmetrix” tag in the User-Agent string when testing your page.

We’ve outlined the scenarios where this may be the case, and how you can remove the “GTmetrix” tag from the User-Agent string, if necessary.

 


 

Test with different countries, speeds and options

Basic GTmetrix Splash

Get access to more Test Locations, Analysis Options and Connection Speeds!

Sign up for a Basic GTmetrix account and see how your site performs in more scenarios – It’s FREE!


Get Started for FREE

Get Mobile Testing, Premium Locations, and more

Basic GTmetrix Splash

Get more On-Demand Tests, Monitored Slots and Premium Test Locations along with Hourly testing with a GTmetrix PRO plan.

Upgrade to GTmetrix PRO and see how your site performs in all scenarios.


Upgrade now

Cookie Policy

By clicking "Allow All" you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. View cookie details

Deny Allow All
×