The referer access control settings in the StackPath control panel determines which domains can and can not access content delivered by StackPath SecureCDN. This feature is primarily used to prevent hotlinking.
There are two ways to permit or deny refering domains access to CDN content – whitelisting and blacklisting. By default, no domains are whitelisted or blacklisted after a site is created. Settings must be configured manually.
Whitelisting and blacklisting can not be used simultaneously.
This tutorial assumes a site is created.
Whitelisting Domains
Whitelisting denies all domains access to the StackPath CDN assets except for the domains added to the whitelist. If a company only wants its website visitors allowed access to CDN assets, whitelisting is a good solution. But there are some caveats to whitelisting.
Some companies experience SEO-related issues after whitelisting domains. For instance, even after whitelisting a search engine like Google (google.com), the search engine may de-index asset(s) from search results. For this reason, it’s important to consult a technical SEO specialist and/or our support team before whitelisting domains.
To whitelist domains in the StackPath control panel:
-
Log in to the StackPath control panel:
-
Select Sites in the left-hand menu bar:
-
For the site you want to whitelist referers for, select Manage.
- Select CDN in the left-hand menu bar choose Security.
-
Select the Whitelist tab, then type the first domain into the text field. After typing the domain, hit Enter on your keyboard. Specify any additional domains, then select Update:
Blacklisting Domains
Blacklisting allows all domains access to CDN assets except for the domains added to the blacklist. If a specific domain is hotlinking content on a site, that domain can be added to the blacklist and denied access to assets delivered by StackPath CDN.
For the purpose of SEO, blacklisting is safer than whitelisting.
To blacklist domains, follow steps 1-4 in the Whitelisting Domains section above. But instead of selecting the Whitelist tab, select the Blacklist tab.