GTmetrix Performance Blog

News, updates and guides on GTmetrix and general web performance

Whitelist or Blacklist URLs in your tests!

Blacklisting useful for excluding 3rd-party scripts such as Facebook like/share widgets, Google Analytics scripts, Youtube embeds and any other external widgets you might want to be not be part of your page load.

Conversely, whitelisting a URL will ONLY serve resources from that domain.

Both support a wildcard (*) that will designate all resources that begin with the URL inputted as blacklisted/whitelisted.

How do I do it?

The Whitelist/Blacklist URLs feature is located in the “Advanced Options” dropdown on the Dashboard in the “Advanced” tab, or the “Page Settings” modal on the Report page also in the “Advanced” tab.

Input your desired URLs and hit Go!

 

Input your desired URLs, Save your settings, and retest!

 

To Whitelist a URL

This means that GTmetrix will ONLY grab resources from the URL you designated for analysis.

Example 1 – Single URL:

Inputting http://www.domain.com/foo/ will result in testing that ONLY includes resources referencing that URL. References to other URLs, even on the same domain (ie. http://www.domain.com/bam/), are NOT included in the analysis.

Example 2 – Wildcard:

Inputting http://www.domain.com* will result in testing that ONLY includes resources referencing that entire domain. The wildcard(*) designates that all resources that begin with the inputted URL will be whitelisted (eg. http://domain.com/image.jpg, http://domain.com/js/script.js” will be part of the report, where as http://anotherdomain.com/image.jpg will not be).

To Blacklist a URL

This means that GTmetrix will EXCLUDE resources from the URL you designated for analysis.

Example 1 – Single URL:

Inputting http://www.domain.com/foo/ will result in testing that excludes resources referencing that URL. All references to other URLs will still be included (eg. http://domain.com/bam/).

Example 2 – Wildcard:

Inputting http://www.domain.com* will result in testing that excludes all resources referencing that entire domain. The wildcard(*) designates that all resources that begin with the inputted URL will be blacklisted (eg. http://domain.com/image.jpg, http://domain.com/js/script.js” will not be part of the report)