Point your computer to the edge servers

To test your property configuration on staging, first modify your hosts file to direct your computer to request content from a staging edge server rather than your origin server. This practice is commonly referred to as spoofing.

How to

  1. In Control Center, select your group breadcrumb.
  2. On the Property Groups page, select the Property Name link for your property.
  3. On the Property Details page, in the Manage Versions and Activations section, click the version that you want to test.
  4. On Property Manager Editor page, in the Property Hostnames section, find your edge hostname.
  5. Look up the IP address of the staging version of that edge hostname using one of the methods below, and copy it to your local clipboard.
    The staging version of your edge hostname inserts -staging before the final .net.
    • On a Windows computer, open a new command prompt and perform an nslookup of the staging hostname: nslookup my-api.hostname.edgekey-staging.net
    • On a Mac computer or Linux/Unix machine, open a new terminal, and perform a dig of the staging hostname: dig my-api.hostname.com.edgekey-staging.net
  6. Open your local hosts file in a text editor.
    To locate the hosts file on a:
    • Windows computer, go to C:\Windows\System32\drivers\etc\hosts. The directory above \system32\ might vary in your environment.
    • Mac computer, go to /private/etc/hosts.
    • Linux/Unix machine, go to /etc/hosts.
  7. At the end of the hosts file, add an entry for your origin hostname that includes the IP address of the staging version of the edge hostname (from clipboard) and also your property’s domain. For example: my-api.hostname.com
  8. Save and close the hosts file.
    Note: To undo the redirection to the edge server, remove the new entry from your hosts file.
  9. On Mac OS X 10.6 and later, run the following command to flush your DNS cache: dscacheutil -flushcache

What you should see

Any requests that you’ll make from this computer will go to the staging edge servers.