Documentation

Create a new zone
Like all CDNs, NuevoCloud is essentially a reverse proxy service. It accepts and responds to requests from the internet (over HTTP or HTTPS) for your domain. If NuevoCloud has cached the data for the request, it will respond to the request itself. If it has not cached the data, it will proxy the request to your server (called the origin server). Once your server has responded to the request, NuevoCloud will send that response back to the client.

To configure a new zone, you'll need a few things:

  • The domain name of your website (optional)
  • IP address or URL of your origin server

Website settings

In this section, you'll tell NuevoCloud how to respond to requests from the internet. The form will change depending on how you answer the questions, so you may not see all of the options listed below.

Enable CNAME
When you select yes, it will ask you for the domain name for your website. This should include the subdomain (if any). For instance, example.com or www.example.com would both be valid entries.

If you do not have a domain name, you'll be able to choose a nuevocloudcdn.com subdomain.

Enable SSL
If you are using your own domain name, you'll be asked if you want to enable SSL for that domain. If you choose to enable it, you'll be asked for the SSL certificate that NuevoCloud should use for your domain. The Common Name for the certificate should match the domain name. If you enabled Redirect Apex, your certificate should be valid for both your domain and the apex (www.example.com and example.com).

Redirect HTTP to HTTPS
Enabling this option forces all clients to connect using SSL. Connections over HTTP will be redirected to HTTPS.

Enable HSTS
HSTS (HTTP Strict Transport Security) is a web security policy mechanism. It allows you to tell web browsers that they should always connect over HTTPS. If you enable HSTS, you'll be asked for a Max Age setting in seconds. Max Age is how long browsers should remember to only connect over HTTPS. Only enable this setting if you are sure you want to permanently enable SSL, since it cannot be disabled quickly.

Note: HSTS is only available if you have enabled Redirect HTTP to HTTPS.

Origin settings

In this section, you'll tell NuevoCloud how to contact your origin server.

Origin Server URL
This should be the URL to your origin server, including the protocol and path (if any). NuevoCloud will append the requested resource path to this URL. For example, if a visitor requests www.example.com/resource, and your Origin Server URL is https://0.0.0.0/folder, NuevoCloud will connect to https://0.0.0.0/folder/resource.

You can use a domain name in the Origin Server URL, but you must not use the domain name you entered under Website Settings.

Forward Query String
The query string is the portion of the URL after the ?. For example, in http://www.example.com/resource?q=value the query string is q=value.

If you enable this setting, NuevoCloud will consider the query string as part of the URL and will forward the query string when sending requests to your origin server.

If this is disabled, NuevoCloud will ignore the query string. Meaning http://www.example.com/resource?q=value1 and http://www.example.com/resource?q=value2 would be considered to be requests for http://www.example.com/resource.

Test your new zone
After creating your new zone, you can now test NuevoCloud to ensure requests are being sent to your origin server correctly.

On the dashboard for your new zone, find your CDN URL and copy&paste this URL into your browser. If everything is working correctly, you should see a response from your origin server.

If you received an error, edit your zone settings by clicking the Edit Settings button on the zone dashboard.

Set cache control headers
NuevoCloud is an HTTP-compliant service. According to the HTTP standard, resources from your website must be revalidated with your origin server (or not cached at all) unless a valid cache control header is set. To obtain the best performance, a Surrogate-Control, Cache-Control, or Expires header should be set on your origin server. See the Cache headers section for more information.

Test caching
Caching behavior should be tested to ensure dynamic content is detected as dynamic and that static resources are cached. This can be done by viewing the headers for a resource on your CDN URL and examining the X-Cache header in the response.

Configure DNS
Now that you've configued and tested your new zone, it's now ready to be used by visitors.

If you do not have a domain name, you can use your CDN URL directly. There are no changes that need to be made to your DNS settings. You're finished.

If you do have a domain, you'll need to create a couple of DNS records with your DNS provider for the domain.

  1. Required
    If your domain name has a subdomain (for example, www in www.example.com):
    Locate the CNAME records for your domain name, and add a CNAME record.

    NameTTLRecord TypeValue
    Your subdomain

    Example: www

    3600CNAMEYour NuevoCloud CDN URL

    Example: cdn.nuevocloudcdn.com

    If your domain does not contain a subdomain OR you enabled Redirect Apex in the zone settings, you'll need to add an Apex CNAME record.

  2. Apex (aka root) CNAME Record
    Verify that your DNS provider supports Apex CNAME records. DNS providers use various names for this type of record including ALIAS, ANAME, CNAME Flattening, and Root CNAME. Follow your DNS providers instructions for creating this type of record and use the following values:

    NameTTLValue
    60Your NuevoCloud CDN URL

    Example: cdn.nuevocloudcdn.com

Performance Testing
After your website has been placed behind NuevoCloud and is being used by your visitors, it may take up to 24 hours to reach peak performance. During the initial 24 hours NuevoCloud will populate its cache, learn how to handle your dynamic content, and gather data to optimize the dynamic routing of requests. If you want to accurately guage the effect NuevoCloud has on your website's performance, the testing should be completed after this 24 hour period has passed.

If you need assistence optimizing your website, send us an email and one of our engineers would be happy to help.

Cache headers: Cache-Control, Surrogate-Control, and Expires
NuevoCloud determines what to cache by examining the cache headers in the response from your origin server:

  1. Surrogate-Control
    The Surrogate-Control header is the first header NuevoCloud attempts to use. This header has the same options as Cache-Control, but is only used to control NuevoCloud's cache, and is not sent to browsers.

    Example

    Surrogate-Control: public, max-age=86400
  2. Cache-Control
    If the Surrogate-Control header is not present, NuevoCloud will look for the Cache-Control header. This header also controls the visitors browser cache.

    Example

    Cache-Control: max-age=3600, must-revalidate
    Options
    max-ageThe maximum number of seconds the resource should be considered fresh.
    s-max-ageSimilar to max-age, but only applies to shared caches.
    NuevoCloud will use s-max-age (instead of max-age) if it's present.
    private
    no-cache
    no-store
    If any of these options are present, NuevoCloud does not cache the resource.

  3. Expires
    Finally, if neither a Surrogate-Control or Cache-Control header is found, NuevoCloud will examine the Expires header.

    Example

    Expires: Tue, 01 Jan 2030 00:00:00 GMT

These options can be combined to control both NuevoCloud's cache and the visitors browser cache separately. For example, to cache a resource at the CDN edge for 24 hours, but not in a visitor's browser cache, you could use headers similar to this:

Surrogate-Control: max-age=86400
Cache-Control: no-cache
Expires: -1
In this example, you can take advantage of NuevoCloud's caching, but since the resource is never cached by the browser, when you purge a file from NuevoCloud, you can be sure all of your visitors are seeing the new file.

Cache headers are one of the most useful tools at your disposal to implement your cache policy.

Understanding the X-Cache header
NuevoCloud adds an X-Cache header to all responses to help diagnose caching issues. Since NuevoCloud replicates cache objects, the response you receive will be identical to every node in the world (ie, if a resource is cached for you, it is also cached for everyone else in the world). The X-Cache header value indicates how NuevoCloud will cache a resource:

  • Dynamic: The resource has a missing cache header or the cache header indicates it should not be cached.

  • Hit: The resource was in NuevoCloud's cache and the response was sent directly from the edge node without contacting the origin server.

  • Miss: The resource was not in NuevoCloud's cache, and was pulled from the origin server.

  • Expired: The resource was in NuevoCloud's cache, but was stale. An updated copy was obtained from the origin server.

  • Revalidated: The resource was in NuevoCloud's cache, but was stale. The resource was revalidated with the origin server by checking the E-Tag or Last-Modified header.

Getting visitor IPs
Since NuevoCloud acts as a reverse proxy, connections to your server will come from one of NuevoCloud's edge servers. When a request passes through NuevoCloud, the IP address of the client is added to the X-Forwarded-For header. If there is not an existing X-Forwarded-For header in the request, NuevoCloud will add it:

X-Forwarded-For: A.B.C.D
where A.B.C.D is the client IP address. If the header already exists, NuevoCloud will append the client IP address to the header:

X-Forwarded-For: a.a.a.a, b.b.b.b, A.B.C.D
Automatic gzipping: extensions and file types
NuevoCloud will automatically gzip content if 1) the client making the request supports gzip; and 2) the content has the following content-type or the filename ends with one of the following extensions:

Content-Types
  • text/html
  • text/css
  • application/x-javascript
  • application/javascript
  • text/javascript
  • text/plain
  • text/xml
  • application/json
  • application/vnd.ms-fontobject
  • application/x-font-opentype
  • application/x-font-truetype
  • application/x-font-ttf
  • application/xml
  • font/eot
  • font/opentype
  • font/otf
  • image/svg+xml
  • image/vnd.microsoft.icon

File Extensions
  • .js
  • .css
  • .html
  • .json
  • .ico
  • .eot
  • .otf
  • .ttf

NuevoCloud also requests gzip when making requests to your origin server. Enabling gzip on your origin server will save bandwidth transferring data to NuevoCloud.
Request and response limits
NuevoCloud places the following limits on requests and responses. An error page will be displayed if these limits are exceeded.

Request Limits

Exceeding these limits will result in a 413 Request Entity Too Large error.

  • Maximum POST body: 100 MiB

Response Limits

Exceeding these limits will result in a 502 Bad Gateway error.

  • Maximum header size: 128 KiB
  • Maximum body: 100 MiB