What is the Origin used for?
The Origin field lets StackPath know the destination of the host where we should be pulling assets from. There are two basic ways in which this host can be specified:
- You can enter the IP of the host server
- You can enter a Fully Qualified Domain Name (FQDN) for the host
Using the Host IP: This is the default option, and typically the most reliable. You should use this option if the CDN needs to pull from a different IP than your DNS records point to. Some examples of this include:
- The DNS records are pointed to the CDN (full-site integration)
- You have a separate IP that static files are served from
- Your host is behind a reverse proxy service, like Sucuri
Using an FQDN: This option will only work for CDN plugin integrations. The benefit is that even if your host changes the IP of your server, the StackPath will always be pulling from the same server as requests to your domain.
Custom Ports: By default, StackPath will pull over port 80 for http:// requests to the origin and port 443 for https:// requests to the origin. The CDN is capable of pulling over ports 80, 443, 1935, and 8080. If you wish to define one of these ports to be used rather than using the default, you can specify the port, e.g. domain.com:8080
or 10.10.10.10:1935
Using StackPath's anycast IP or your site's edge address as the origin address causes the CDN to load content in a loop and will generate errors for your users. If the DNS records for your domain resolve to the CDN IP, entering your domain name in this field will cause the same error.