The secure sockets layer (SSL) protocol is used by secure sites to encrypt communication between the server and the user's browser. In order for a site to be SSL-compliant, all elements loaded onto the site must also use SSL.
If a non-secure creative is served onto a secure site, it can prompt a warning in the user's browser, cause ad serving problems, or even cause the entire page to be blocked. Therefore, it is very important to pay attention to SSL compliance.
How protocol-relative URLs work
A protocol-relative URL has neither HTTP nor HTTPS at the beginning. Instead it starts with a //
. A protocol-relative URL has the advantage of automatically adapting to the protocol of the page the URL is used on. You can only use protocol-relative URLs from hosts that support both HTTP and HTTPS serving.
Switching to a protocol-relative URL
If a URL begins with http://
and you want to use the protocol-relative version of the same URL, make sure to first test the HTTPS version of the URL in a browser. Not all sites have HTTPS enabled, and attempting to load URLs that are not enabled for secure serving will cause an error. A simple way to check if a URL works over HTTPS is to enter the url with https://
in a browser.
Local Testing
Protocol-relative urls have one disadvantage: when creative developers work on their creatives from their workstation, browsers sometimes try to open them via the file://
protocol. That means the protocol-relative URL does not work in a local environment. As this only impacts local testing of a creative, it's still recommended to use protocol-relative URLs when possible. If a developer wants to test the pixel locally too, the protocol needs to be specifically set to https://
.