Manuel Alvarez

Testing on Akamai (Spoofing)

Blog Post created by Manuel Alvarez Employee on Jun 15, 2015

A common question I receive is how to test in Akamai Staging or how to test before CNAMEing to Akamai. The process consists on spoofing your host file to trick your computer into reaching an specific IP rather than resolve on DNS. This is how:


   a. Look up the IP address for the Akamai Edge Hostname using the ‘dig’ or ‘nslookup’ command as dig *** (or edgesuite if you are not ding secure traffic). For example


            -  you can use an online tool if you are not familiar with command prompt. Check

            -  For testing in staging, replace the domain in step 1 to ***


    b. Put the IP  returned into your hosts file as ip.ip.ip.ip ***. For example


            -  Repeat step ‘b’ for all the domains you want to spoof

            -  Windows: C:\WINDOWS\system32\drivers\etc\hosts

            -  Mac: /private/etc/hosts


    c. Save file (you might need admin rights)

            -  Note that if you are new to Akamai, you will need to wait until your Akamai configuration and edge hostname are ready for testing


    d. Restart browser and make requests for


    e. Confirm you are testing in Staging. Akamai Staging servers include the HTTP response header X-Akamai-Staging as described on this article (log in required)


Testing Tools

Akamai provides several tools to help you get additional information about your site. These tools can be used to debug and troubleshoot your site on the Akamai network.  Please see the following link for more information: (log in required).

The link above contains information on how to add Akamai Pragma Headers on Firefox. For Chrome, check this video How to add Akamai Pragma Headers in Google Chrome. An useful and easy to use tool on Windows is Hosts File Editor - Home


Check this post from Damian Garbacz to get more information about what information you should be looking in the response headers


See also this article on the Luna Control Center (requires log in)


China CDN Customers

Customers with China CDN must perform additional steps to obtain an Staging IP as explained at (log in required)