What are the Best Practices for Adding Domains, Subdomains, and Wildcards? [Legacy Customers]
A Web font project's domain list is used to validate Web font requests made by your pages. For that reason it's important to ensure that the pages using your project are properly included in your Web font project's domain list.
Some examples of good domain entries are:
Example 1: Primary domain
Entry: example.com
Covers: http://example.com/ , http://www.example.com/
Does not cover: Subdomains (http://blog.example.com/) , Different Top-level domains (http://example.org)
Example 2: Specific subdomain
Entry: staging.example.com
Covers: http://staging.example.com/ , http://www.staging.example.com/
Does not cover: Other subdomains (http://preview.staging.example.com/ , http://prototype.example.com/), Different top-level domains (http://staging.example.org/)
Example 3: Multiple subdomains
Entry: *.example.com
Covers: Any subdomain (http://www.example.com/ , http://dev.example.com/ , http://test1.staging.example.com/)
Does not cover: Domain without a subdomain (http://example.com/), Different top-level domains (http://www.example.org)
Using the examples above, here are some common consolidation options to reduce the number of entries and maximize the domain list's efficiency:
Domain list 1:
- www.example.com
Consolidation:
Item 1 can be changed to example.com
Domain list 2:
- example.com
- www.example.com
Consolidation:
Item 2 can be removed as it adds no more functionality than Item 1
Domain list 3:
- dev.example.com
- preview.example.com
- blog.example.com
- www.example.com
Consolidation:
Items 1, 2, and 3 can be replaced by *.example.com. If http://example.com/ re-directs to http://www.example.com/ , Item 4 can also be removed as part of this consolidation. If it does not redirect, it can instead be changed to example.com .